I'm not sure which NG I should ask this question.

  • Thread starter Thread starter billybob
  • Start date Start date
B

billybob

I'm very new at templates and macros. I would like to edit the vba command code to only show and print "This is What Typeface will Look Like" instead of the "ABCDE..., abcde...,etc. (keeping it simple).Would someone "in the know" show me how to edit this portion of the command to generate the desitrd result?

Sub FontSampleGenerator()
Dim oDoc As Document, SampleText As String, FontName As String, _
MyRange As Range, StartRange As Range, i As Long

Set oDoc = Documents.Add
SampleText = Chr$(147) & "ABCDEFGHIJKLMNOPQRSTUVWXYZ" & _
Chr$(148) & ", " & _
Chr$(147) & "abcdefghijklmnopqrstuvwxyz" & Chr$(148) & ", " & _
Chr$(147) & "0123456789" & Chr$(148) & ", " & _
Chr$(147) & "The quick brown fox jumps over the lazy dog" & Chr$(148) & ", " & _
Chr$(145) & "àáâéêëìíîòóôùúû" & Chr$(146) & ", " & _
Chr$(145) & "(;,.:£€$?!)" & Chr$(146)

System.Cursor = wdCursorWait

Thanks, anyone!
 
I'm very new at templates and macros. I would like to edit the vba
command code to only show and print "This is What Typeface will
Look Like" instead of the "ABCDE..., abcde...,etc. (keeping it simple).
Would someone "in the know" show me how to edit this portion of
the command to generate the desitrd result?

Sub FontSampleGenerator()
Dim oDoc As Document, SampleText As String, FontName As String, _
MyRange As Range, StartRange As Range, i As Long

Set oDoc = Documents.Add
SampleText = Chr$(147) & "ABCDEFGHIJKLMNOPQRSTUVWXYZ" & _
Chr$(148) & ", " & _
Chr$(147) & "abcdefghijklmnopqrstuvwxyz" & Chr$(148) & ", " & _
Chr$(147) & "0123456789" & Chr$(148) & ", " & _
Chr$(147) & "The quick brown fox jumps over the lazy dog" & Chr$(148) & ", " & _
Chr$(145) & "àáâéêëìíîòóôùúû" & Chr$(146) & ", " & _
Chr$(145) & "(;,.:£€$?!)" & Chr$(146)

System.Cursor = wdCursorWait

Thanks, anyone!

You code in this part of the macro should look like this:

Sub FontSampleGenerator()
Dim oDoc As Document, SampleText As String, FontName As String, _
MyRange As Range, StartRange As Range, i As Long

Set oDoc = Documents.Add
SampleText = "This is What Typeface will Look Like"

System.Cursor = wdCursorWait
 
Thank you so much Jay. Just the response needed. You've answered quite a
few of my questions over the years and you always give a very professional,
yet very easy to understand response.
 
Back
Top