A
Arnica
I'm trying to set up a macro (Word 2003) to do several replacements in
selection of my text with italics in the replacement field.
I.e. I have a certain number of words (non italic) that need to b
replaced with another word in italic.
I recorded the sequence for one of the words (actually, these are name
of notes that need to be translated and italicized, A>LA, B>SI, etc.)
and then copied it for each word.
My problem is that the italics don't get inserted with the macro, thoug
they appeared when I recorded it.
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "A"
.Replacement.Text = "LA"
.Forward = True
.Wrap = wdFindStop
.Format = True
.MatchCase = True
.MatchWholeWord = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
What do I need to add to get the italics?
Many thanks
selection of my text with italics in the replacement field.
I.e. I have a certain number of words (non italic) that need to b
replaced with another word in italic.
I recorded the sequence for one of the words (actually, these are name
of notes that need to be translated and italicized, A>LA, B>SI, etc.)
and then copied it for each word.
My problem is that the italics don't get inserted with the macro, thoug
they appeared when I recorded it.
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "A"
.Replacement.Text = "LA"
.Forward = True
.Wrap = wdFindStop
.Format = True
.MatchCase = True
.MatchWholeWord = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
What do I need to add to get the italics?
Many thanks