J
jg0017
In the sub below I need to make line six return 'true' on any OTHER font that
the one listed. I've tried all the normal operands and nothing works.
The sub purpose is to replace all fonts with one single font.
Thanks,
Mike
Sub ReplaceFont()
With Selection.Find
' Clear all previously set formatting for Find dialog box.
.ClearFormatting
' Set font to Find for replacement.
.Font.Name = "Arial"
' Clear all previously set formatting for Replace dialog box.
.Replacement.ClearFormatting
' Set font to Replace found font.
.Replacement.Font.Name = "Times New Roman"
' Don't find or replace any text.
.Text = ""
.Replacement.Text = ""
' The following parameters must be set as follows
' to find only text formatted for the specified font.
' .Forward = True
' .Wrap = wdFindContinue
' .Format = True
' .MatchCase = False
' .MatchWholeWord = False
' .MatchWildcards = False
' .MatchSoundsLike = False
' .MatchAllWordForms = False
End With
' Perform the find and replace.
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
the one listed. I've tried all the normal operands and nothing works.
The sub purpose is to replace all fonts with one single font.
Thanks,
Mike
Sub ReplaceFont()
With Selection.Find
' Clear all previously set formatting for Find dialog box.
.ClearFormatting
' Set font to Find for replacement.
.Font.Name = "Arial"
' Clear all previously set formatting for Replace dialog box.
.Replacement.ClearFormatting
' Set font to Replace found font.
.Replacement.Font.Name = "Times New Roman"
' Don't find or replace any text.
.Text = ""
.Replacement.Text = ""
' The following parameters must be set as follows
' to find only text formatted for the specified font.
' .Forward = True
' .Wrap = wdFindContinue
' .Format = True
' .MatchCase = False
' .MatchWholeWord = False
' .MatchWildcards = False
' .MatchSoundsLike = False
' .MatchAllWordForms = False
End With
' Perform the find and replace.
Selection.Find.Execute Replace:=wdReplaceAll
End Sub