LizW said:
Hi there,
We didn't have any luck with the Tools, Macro Record feature when
trying to find italics with the find dialog box. The macro won't run.
Is there a way to do it in VBA?
Hi Liz,
The braindead recorder is sometimes completely worthless. In this case, it
records the fact that you're looking for formatting, but it forgets to
record what kind of formatting you asked for!
Press Alt+F8 to open the list of macros, select the name you gave to the
recorded macro, and click the Edit button. In the editor, you'll see
something like this:
Sub FindItalic()
'
' FindItalic Macro
' Macro recorded 11/23/2004 by ...
'
Selection.Find.ClearFormatting
With Selection.Find
.Text = ""
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
End Sub
After the line .Text = "" you should insert the missing line:
.Font.Italic = True