I need a macro to insert WordArt characters using the WordArt Style 1 (outline). I want to be able to enter the text and select the font.
Using the macro recorder, I came up with this:
Code:
Sub MyWordArtOutline()
Const MyName As String = "MyWordArtOutline"
Dim InString As String 'The string of characters to be inserted
Dim i As Long
Dim Font As String
Dim char As String
InString = InputBox("Enter the string", MyName)
Font = InputBox("Enter the name of the font", MyName)
For i = 1 To Len(InString)
char = Mid(InString, i, 1)
ActiveDocument.Shapes.AddTextEffect(msoTextEffect1, char, _
Font, 36#, msoFalse, msoFalse, 239.25, 233.6).Select
Selection.MoveRight Unit:=wdCharacter, Count:=1
Next i
End Sub
It works, but it could work better. I have a few questions:
- Is there any way for the macro to put the list of available fonts so the user can select one, instead of having to type in the name?
- The WordArt letters some in in the middle of the page and all on top of each other. How can I get them to be side by side at the cursor?
- Can anyone explain what the other WordArt parameters mean (msoFalse, 239.25, 233.6?
Thanks