Making Word VBA make select word BOLD, UNDERLINE ETC

30 Views Asked by At

I have a macro that changes gender terms. I would like for it BOLD, UNDERLINED and FONT SIZE = 20. I specify this below but nothing happens to the replace text in the document. Any help would be greatly appreciated.

your textSelection.Find.ClearFormatting your textSelection.Find.Replacement.ClearFormatting your textWith Selection.Find your text .Text = "[Mr./Ms.]" your text.Replacement.Text = "Ms." your text your text.Forward = True your text.Font.Underline = True your text.Font.Bold = True your text.Font.Size = 20 your text.Wrap = wdFindContinue your text.Format = False your text .MatchCase = False your text.MatchWholeWord = False your text.MatchWildcards = False your text.MatchSoundsLike = False your text .MatchAllWordForms = False your textEnd With your textSelection.Find.Execute Replace:=wdReplaceAll

I tried specifing orders of the form "font.underline, bold or font size = 20." This did not show up in the document when I ran the macro.

0

There are 0 best solutions below