If character="[" Bold the item
After the first state triggers keep bolding until "]" occurs, then bold that item and from then on reset to normal text. Continue till document searched.
I am totally confused with the object commands.
Thanks for any help
Code: Select all
Sub ChangeFonts()
Dim Flag as boolean
Dim doc as object
dim page as ThisComponent
For i = 1 to ActiveDocument.Range.Characters.Count
if doc.Range.Character(i).Text="[" then Flag=true
if Flag=true then doc.Range.Character(i).Font.Bold=true
if doc.Range.Character(i).Text="]" then Flag=false
Next
End Sub