S
Stephen Miller
I wish to create a simple macro (don't we all?) that will
replace all the digits in Adobe Garamond with the digits in
Adobe Garamond Expert (basically, I want old style figures
in my documents).
So I *recorded* a macro which turns out so:
Sub Macro1()
'
' Macro1 Macro
' Macro recorded 20/1/04 by Stephen Miller
'
Selection.Find.ClearFormatting
With Selection.Find.Font
..Size = 10
..Bold = False
..Italic = False
End With
With Selection.Find
..Text = "1"
..Replacement.Text = ""
..Forward = True
..Wrap = wdFindContinue
..Format = True
..MatchCase = False
..MatchWholeWord = False
..MatchWildcards = False
..MatchSoundsLike = False
..MatchAllWordForms = False
End With
Selection.Find.Execute
Selection.Find.ClearFormatting
With Selection.Find.Font
..Size = 10
..Bold = False
..Italic = False
End With
Selection.Find.Replacement.ClearFormatting
With Selection.Find.Replacement.Font
..Size = 10
..Bold = False
..Italic = False
End With
With Selection.Find
..Text = "1"
..Replacement.Text = "1"
..Forward = True
..Wrap = wdFindContinue
..Format = True
..MatchCase = False
..MatchWholeWord = False
..MatchWildcards = False
..MatchSoundsLike = False
..MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
I am no rocket scientist but even I know that this will not
work as the macro has recorded *nothing* about the fonts so
when it is run it simply replaces "1" in the current font
with, er, "1" in the current font!
Can anyone help with the magic needed to invoke the
particular or for that matter any font I choose?
Thanks
Stephen Miller
replace all the digits in Adobe Garamond with the digits in
Adobe Garamond Expert (basically, I want old style figures
in my documents).
So I *recorded* a macro which turns out so:
Sub Macro1()
'
' Macro1 Macro
' Macro recorded 20/1/04 by Stephen Miller
'
Selection.Find.ClearFormatting
With Selection.Find.Font
..Size = 10
..Bold = False
..Italic = False
End With
With Selection.Find
..Text = "1"
..Replacement.Text = ""
..Forward = True
..Wrap = wdFindContinue
..Format = True
..MatchCase = False
..MatchWholeWord = False
..MatchWildcards = False
..MatchSoundsLike = False
..MatchAllWordForms = False
End With
Selection.Find.Execute
Selection.Find.ClearFormatting
With Selection.Find.Font
..Size = 10
..Bold = False
..Italic = False
End With
Selection.Find.Replacement.ClearFormatting
With Selection.Find.Replacement.Font
..Size = 10
..Bold = False
..Italic = False
End With
With Selection.Find
..Text = "1"
..Replacement.Text = "1"
..Forward = True
..Wrap = wdFindContinue
..Format = True
..MatchCase = False
..MatchWholeWord = False
..MatchWildcards = False
..MatchSoundsLike = False
..MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
I am no rocket scientist but even I know that this will not
work as the macro has recorded *nothing* about the fonts so
when it is run it simply replaces "1" in the current font
with, er, "1" in the current font!
Can anyone help with the magic needed to invoke the
particular or for that matter any font I choose?
Thanks
Stephen Miller