S
Stephen Harding
I am relatively new to vba scripting, but have most of it happening well. I
do have some word doccuments that have both text boxes and normal writing
and I am trying to replace text in both of them. What I am finding is that
if I do the replaceall manually, it gets the lot(even header & footer) but
when I program it into vba it only replaces the ones in the main body. I
managed to figure a workaround for the header & footer, but can't seem to
get it happening for the text boxes(or wordart).
Has anyone got any suggestions?
Here is the code I am using for the replaceall function.
Selection.Find.ClearFormatting
With Selection.Find
.Text = "&&&"
.Replacement.Text = setnum
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Thank you. Steve Harding
do have some word doccuments that have both text boxes and normal writing
and I am trying to replace text in both of them. What I am finding is that
if I do the replaceall manually, it gets the lot(even header & footer) but
when I program it into vba it only replaces the ones in the main body. I
managed to figure a workaround for the header & footer, but can't seem to
get it happening for the text boxes(or wordart).
Has anyone got any suggestions?
Here is the code I am using for the replaceall function.
Selection.Find.ClearFormatting
With Selection.Find
.Text = "&&&"
.Replacement.Text = setnum
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Thank you. Steve Harding