1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
Sub TestMasquerLesContenus()
MasquerLesContenus True
MsgBox ActiveDocument.ContentControls.Count
MasquerLesContenus False
End Sub
Sub MasquerLesContenus(ByVal Masquer As Boolean)
Dim Controle As ContentControl
Dim Cont_Texte As Variant
For Each Controle In ActiveDocument.ContentControls
With Controle
If .Type <> wdContentControlCheckBox Then
Cont_Texte = .Range
If Cont_Texte = .PlaceholderText Then
If Masquer = True Then
.Range.Font.TextColor = RGB(255, 255, 255)
Else
.Range.Font.TextColor = RGB(0, 0, 0)
End If
End If
End If
End With
Next
End Sub |
Partager