I have a VBA macro to change text color in Publisher :
Code: Select all
Sub paraPuce()
Dim objFind As FindReplace
Dim fFound As Boolean
ThisDocument.Selection.TextRange.Expand Unit:=pbTextUnitParagraph
ThisDocument.Selection.TextRange.ParagraphFormat.TextStyle = "204-BODY PUCE"
Set objFind = ActiveDocument.Selection.TextRange.Find
With objFind
.Clear
.FindText = "Société"
Do While .Execute = True
.FoundTextRange.Font.Fill.ForeColor.SchemeColor = pbSchemeColorAccent1
Loop
End With
End Sub
It's the Do Wile loop that causes me headaches.
If some one could help…