L
LEU
I have the following macro that finds the word ‘Order’ and changes it to all
caps and bold in the whole document. How do I change it to just replace it in
my ActiveDocument.Styles "Heading 1", "Heading 2", "Heading 3" and "Heading
4"?
Dim SearchRange As Range
Set SearchRange = ActiveDocument.Range
With SearchRange.Find
..ClearFormatting
..Replacement.ClearFormatting
..Forward = True
..Format = True
..Wrap = wdFindContinue
..Replacement.Font.Bold = True
..Text = "Order"
..Replacement.Text = "ORDER"
..Execute Replace:=wdReplaceAll
End With
caps and bold in the whole document. How do I change it to just replace it in
my ActiveDocument.Styles "Heading 1", "Heading 2", "Heading 3" and "Heading
4"?
Dim SearchRange As Range
Set SearchRange = ActiveDocument.Range
With SearchRange.Find
..ClearFormatting
..Replacement.ClearFormatting
..Forward = True
..Format = True
..Wrap = wdFindContinue
..Replacement.Font.Bold = True
..Text = "Order"
..Replacement.Text = "ORDER"
..Execute Replace:=wdReplaceAll
End With