Hi all,
I have a replace sub working, but need it to disregard the first page of this word document. The document could be any length, but just the first page needs to be ignored.
VB Code:
Selection.MoveDown Unit:=wdScreen, Count:=3 Selection.EndKey Unit:=wdStory, Extend:=wdExtend Selection.Find.ClearFormatting Selection.Find.Replacement.ClearFormatting With Selection.Find .Text = ".00" .Replacement.Text = "" .Forward = True .Wrap = wdFindAsk .Format = False .MatchCase = False .MatchWholeWord = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False End With Selection.Find.Execute Replace:=wdReplaceAll Selection.HomeKey Unit:=wdLine Selection.HomeKey Unit:=wdStory
This selects everything from page 2 down, replaces the ".00" with nothing, and then takes the cursor home. BUT - when you run this macro (from on the toolbar), it does indeed replace these instances of ".00" from the first page.
Any help or suggestions???




Reply With Quote