S
Steved
Hello form Steved
I was kindly given this by this group
I copied it and pasted it.
It would not work so I gave it a name (Macro Name)Test
I run it but it come up with highlighting wdstory
a message box came up with Compile error, Invalid Outside
Procedure.
Please what have I not done correctly.
Thankyou.
Dim myrange As Range
Selection.HomeKey wdStory
Selection.Find.ClearFormatting
With Selection.Find
Do While .Execute(FindText:="Kalsoy",
MatchCase:=True, Wrap:=wdFindStop,
Forward:=True) = True
Set myrange = Selection.Range
myrange.MoveEnd wdStory
myrange.End = myrange.Paragraphs(2).Range.End - 1
myrange.InsertAfter "Without Fear"
Loop
End With
I was kindly given this by this group
I copied it and pasted it.
It would not work so I gave it a name (Macro Name)Test
I run it but it come up with highlighting wdstory
a message box came up with Compile error, Invalid Outside
Procedure.
Please what have I not done correctly.
Thankyou.
Dim myrange As Range
Selection.HomeKey wdStory
Selection.Find.ClearFormatting
With Selection.Find
Do While .Execute(FindText:="Kalsoy",
MatchCase:=True, Wrap:=wdFindStop,
Forward:=True) = True
Set myrange = Selection.Range
myrange.MoveEnd wdStory
myrange.End = myrange.Paragraphs(2).Range.End - 1
myrange.InsertAfter "Without Fear"
Loop
End With