K
Kim
Kim said:I need to create a macro to change all fonts of "Times" to "Times New
Roman" in a document. I have that code below. However, my code does not
change the font in some places, for example, in some parts of tables,
headers/footers and in footnotes. How do I add to this code to cover
those areas too?
Sub Times_to_TNR()
'
' Times_to_TNR Macro
' Macro created 1/13/2007 by
'
' Turn screen updating off
Application.ScreenUpdating = False
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
'**********************
.Text = ""
.Font.Name = "Times"
.Replacement.Text = ""
.Replacement.Font.Name = "Times New Roman"
'**********************
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
MsgBox "Done converting font style Times to Times New Roman",
vbOKOnly
End Sub