Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Dim myStoryRange As Range
- For Each myStoryRange In ActiveDocument.StoryRanges
- With myStoryRange.Find
- .Text = "Text to find to replace goes here"
- .Replacement.Text = "And the replacement text goes here"
- .Wrap = wdFindContinue
- .Execute Replace:=wdReplaceAll
- End With
- Do While Not (myStoryRange.NextStoryRange Is Nothing)
- Set myStoryRange = myStoryRange.NextStoryRange
- With myStoryRange.Find
- .Text = "Text to find to replace goes here"
- .Replacement.Text = "And the replacement text goes here"
- .Wrap = wdFindContinue
- .Execute Replace:=wdReplaceAll
- End With
- Loop
- Next myStoryRange
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement