A
Anonymous
Hello
I have written a short macro to replace "@p" throughout a document
with a person's name taken from a dialogue box (FirstName).
The code is:
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "@p"
With .Replacement
.Text = FirstName
End With
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
I want to be able to replace heshe with he or she, hisher with his or
her and himher with him or her depending on whether the the person ios
male or female (radio buttons on dialogue box)
Is there a neat way of doing this with loops or do I need to repeat
the find replace script numerous times
Thanks for any help
Pete
I have written a short macro to replace "@p" throughout a document
with a person's name taken from a dialogue box (FirstName).
The code is:
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "@p"
With .Replacement
.Text = FirstName
End With
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
I want to be able to replace heshe with he or she, hisher with his or
her and himher with him or her depending on whether the the person ios
male or female (radio buttons on dialogue box)
Is there a neat way of doing this with loops or do I need to repeat
the find replace script numerous times
Thanks for any help
Pete