cevillasenor
asked on
Macro to change Fonts
Hello,
I need some help to develop a macro to work in Word so that every time a character is encountered, it changes it to font EurekaSans-Regular, and when it encounters a number, it changes it to font EurekaSans-RegularCaps.... .what I have so far is
----
Selection.HomeKey Unit:=wdStory
Selection.EndKey Unit:=wdStory, Extend:=wdExtend
If Asc(Selection.Text) >= 48 And Asc(Selection.Text) <= 57 Then
Selection.Font.Name = "EurekaSans-RegularCaps"
Selection.MoveRight
End If
If Asc(Selection.Text) >= 65 And Asc(Selection.Text) <= 122 Then
Selection.Font.Name = "EurekaSans-Regular"
Selection.MoveRight
End If
-----
but I can't make to scan the entire document......
Please help!!
Thanks
C
I need some help to develop a macro to work in Word so that every time a character is encountered, it changes it to font EurekaSans-Regular, and when it encounters a number, it changes it to font EurekaSans-RegularCaps....
----
Selection.HomeKey Unit:=wdStory
Selection.EndKey Unit:=wdStory, Extend:=wdExtend
If Asc(Selection.Text) >= 48 And Asc(Selection.Text) <= 57 Then
Selection.Font.Name = "EurekaSans-RegularCaps"
Selection.MoveRight
End If
If Asc(Selection.Text) >= 65 And Asc(Selection.Text) <= 122 Then
Selection.Font.Name = "EurekaSans-Regular"
Selection.MoveRight
End If
-----
but I can't make to scan the entire document......
Please help!!
Thanks
C
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Nice job Graham! I didn't think of a wildcard search and replace. That's why you get the big points! LOL
Thanks Jo. My maths master always said the simplest way is the best way.
ASKER
Excellent job!!!!
Thanks
C
Thanks
C