[comp.windows.ms] W4W Macro Troubles

sip1@quads.uchicago.edu (Timothy F. Sipples) (06/25/91)

Help!  I have tried several different ways of implementing the
following Word for Windows macro but with no luck.  Basically
what I want the macro to do is the following:
 
1) Save the current character formats.
2) Insert a single character using the Times Roman font.
3) Restore the character formats to their states before the macro
   was run.
 
I want the user to hit the macro key and have the new character
inserted with the Times Roman font, regardless of the font the
user has defined at the time of the macro running.  I don't want
the user to have to reset the font, point size, etc. after
running the macro.
 
Here is what I have so far...
 
------------------------ Begin Macro -----------------------
Sub MAIN
 
REM ** This is where I want to save the character format, point
REM ** size etc.
 
Insert "A"
CharLeft 1, 1
 
FormatCharacter .Font = "TimesRoman", .Points = "18", \
.Color = 0, .Bold = 0, .Italic = 0, .SmallCaps = 0, .Hidden = 0,\
.Underline = 0,  .WordUnderline = 0, .DoubleUnderline = 0, \
.Position = "0pt", .Spacing = "0pt"
 
CharRight 1
 
REM ** This is where I would like to return the current character
REM ** formatting back to what was saved before inserting the
REM ** character in the Times Roman font.
 
End Sub
-------------------------- End Macro -----------------------
 
I appreciate any help anyone can provide!  I would appreciate any
responses being sent directly to me at to following address:
Mark.Wilson@f110.n141.z1.fidonet.org
 
-Mark Wilson