🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.ms
Article #13087

W4W Macro Troubles

#13087
From: Timothy F. Sipples
Date: Mon, 24 Jun 1991 23:07
45 lines
2065 bytes
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
Technical Details
Message-ID: <1991Jun24.230731.11337@midway.uchicago.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!midway!quads.uchicago.edu!sip1

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!midway!quads.uchicago.edu!sip1
From: sip1@quads.uchicago.edu (Timothy F. Sipples)
Newsgroups: comp.windows.ms
Subject: W4W Macro Troubles
Message-ID: <1991Jun24.230731.11337@midway.uchicago.edu>
Date: 24 Jun 91 23:07:31 GMT
Sender: news@midway.uchicago.edu (NewsMistress)
Followup-To: poster
Organization: The Hub, FidoNet 1: 141/110, (203) 663-1147
Lines: 45
Poster: Mark.Wilson@f110.n141.z1.fidonet.org