›¥! Ÿ               €   2  —B                  -          ñ)                       8  U  8  U U8    U8    U8    U8    U8   c8    c8    c8    c8    c8    3B   CB   c8    c8  ? ¢8   ¦8    ¦8    ¦8    ¦8    ¦8    ¦8    ¦8    ¦8  ) Ï8   å8  ] B9    B9   `9  B ¢9  É `9    U8    `9    `9    `9                                                                                GJG Macros Guy Gallo CIS PIN 71171,3555
July 30, 1990
FormattedAscii / SimpleAsciiversion 1.0
This template contains two macros to aid in the conversion of a Word for Windows document to a formatted ascii file.

Both macros assume that you have the "Generic / Text Only" printer driver installed on your system.  If you do not, please read pages 162-164 in the Windows manual and install the Generic printer (TTY.DRV) and connect it to FILE:

The more complex of the two CreateFormattedAsciiwill take a Word for Windows document that contains intricate formatting -- tables, columns, underline, bold, centering, etc etc -- and create a document that is compatible with uploading to a telecommunications service.  It deletes headers and footers, and can be made to replace special characters with Ascii equivalents (for instance, as shipped, it searches for EPSBullets, Chr$(183), and replaces them with Asterisks;  you could add to this list).

SimpleAsciiis faster but much more primitive.  It assumes that you are creating a document specifically for conversion to Ascii, and therefore have not used underline, bold, header/s footers, and the like.
Note:  On some bulletin board systems, and in some communications programs, a blank line is not automatically translated properly (the host needs at least a space or it goes into command mode).  By default these two macros replace a blank line (that is, a stand alone carriage return) with a space+Carriage return.  You could change this to any other character by editing the Blank$ Constant at the top of the macro.
These macros are distributed freely for personal use.  If, however, you use them in a corporate setting (that is, they help you make money...) please license the macros by sending a contribution of $25.00 to:
Guy Gallo219 East 69thNew York, NY 10021

&  $Prepares the note for export to disk' © Guy J. Gallod8 bDistributed as FreeWare for personal use.  All corporate uses require registration with the author+� )219 East 69th Street, NYC 10021  ($25.00)$É "************* CreateFormattedAscii>î <July 2, 1990 Guy Gallo for WexTech Systems, Inc. version 1.0-version 1.1 July 30, 1990RIP ark:  This macro assumes that you have the "Generic / Text Only" printer driver\žZ ark:  installed one your system, And connected To FILE :  See Windows manual pp 162 - 164ýMAINAO  9**********Make this 1 if you don't want them to interrupt Q4S2******************************Initialize constants*ˆGeneric$Generic / Text Only on FILE:³
EPSBullet$j· Ë	Asterisk$*Ü
PageBreak$^dï	ParaMark$^pColumnBreak$^14Blank$ 7%5********************Force user to save if never saved#]lz Document–‹	  rThe document must be saved once before exporting.  Pressing Cancel will abort CreatedFormattedAscii, OK will Save.File Export! %		G 1	 8		*ByeD	M U>W<*******************Ask if they want to save a dirty documentX–P  	  %Save WinWord format before exporting?File Export$ G  þM K*************************Move the document off screen to speed and clean upRNP****Uncomment the next three lines if you want to hide document while macro runs"¡ If DocMaximize() Then DocRestoreÄDocMove 1000, 1000ÙDocSize 450, 250 ì(î&*************Get orginal document nameOriginalName$v   57*******Name for print file:TFname$lv  / v  .TXT ”<–:****************************Reset formatting to Normal -- Ó
â| Normal ù2û0**************************** Get Current Printer./dlg4M K>dlg]OriginalPrinter$dlg/  }:8****************************Remove Formatting (bold etc)º)RemoveCharFormat Ñ2Ó0***************************** Set Printer to TTYM / Generic$ ,7.5*****************************Set Tables to 1.6 inchesfTablesFormat t3v1***************************** Set Document formatª5dlg4z Ç>dlgÙdlgK 0j" údlgL 1.5j" 	dlgI 0j" >	dlgJ 0j" a	z dlg u	"w	 **** Remove headers and footers š	DeleteHeaders ©	_«	]********Remove Section marks, hard page breaks, Column Break;  replace bullets with Asterisks)

SubReplace
PageBreak$	ParaMark$+.

SubReplaceColumnBreak$	ParaMark$)S

SubReplace
EPSBullet$	Asterisk$ v
'x
%********************** Print the file  
6Printing to file: Fname$Å
/Fname${Enter}â
J  í
Iï
G**********************A kludge to get the end of line terminators right9
HÙ S/{Enter}gq Fname$ z4|2**** Bypass paragraph formatting from Normal style±
$Àx     ¡ 0j"  9¢ 0j" £ 0j" ¤ 0li .S¥ 0li¦ 1li§  ¨   8ž©  ª  «  ¬  ­    ô4ö2***********Replace blank line with Blank$ constantL+
SubReplace	ParaMark$	ParaMark$	ParaMark$Blank$	ParaMark$ h"j ***********Save as Text w/Breaks�H  Fname$Ì   µ2·Ð  **************Close the file without savingFïM   / OriginalPrinter$&***********Go back to original printer7EF OriginalName$#**********Open the WinWord document �Yƒ  Load text file [Fname$] into Notepad for review?File Export$  â	/%foFName${enter}	£ notepad.exe&bye,/5-*********************************************:e8************************End of Main CreateFormattedAscii/ -*********************************************Ð
SubReplaceS$R$è	G;ú	[ Í S$Î R$Ï   Ð   Ž    U	Ì   c lnDeleteHeaders�	] ‡   ž	
®	Ù º	È	Ô	] ‡  ñ	
	Ù 		] ‡  6	
F	Ù R	^	] ‡  {	
‹	Ù —	£;¬9******************************Remove Character formattingèRemoveCharFormat	þ***BoldG8÷ !  "  #  $  %   1m&  '  (  )   ¹*  +  -  6ð[ Í  Î ^mÏ   Ð   Ž    LÌ  
Y**ItalicdG<u÷ !  "  #  $  %     1Ê&  '  (  )   *  +  -  6M[ Í  Î ^mÏ   Ð   Ž    ©Ì  ¶*** SmallCapsÆG:×÷ !  "  #  $  %   /-&  '  (  )   w*  +  -  6®[ Í  Î ^mÏ   Ð   Ž    
Ì  *** Underline'G:8÷ !  "  #  $  %   /Ž&  '  (  )   Ø*  +  -  6[ Í  Î ^mÏ   Ð   Ž    kÌ  x*** Word Underline�G:ž÷ !  "  #  $  %   3ô&  '  (  )     ?*  +  -  6v[ Í  Î ^mÏ   Ð   Ž    ÒÌ  ß**Double UnderLineôG:÷ !  "  #  $  %   1[&  '  (  )   §*  +  -  6Ü[ Í  Î ^mÏ   Ð   Ž    8Ì  1E/*** Reset the Search to no character formatting:w÷ !  "  #  $  %   1Í&  '  (  )   *  +  -   PR [T]R***********************Calculate the width of the DefaultTable and all user tables²TablesFormatÄGÕ!8 \Sel	\EndOfDoc!þ	!8 \Sel\Table *		F-6	8 \Sel	\EndOfDoc  *Outo	")v	8 \SelDefaultTable ©%¸#Ä& !Ó í 1j" '  XV****************Note, the ColumnWidth for all by column 4 could be smaller if you likee%t!~& !� í 1j" '  Æ%Õ!ß& !î í 1j" '   ')%8!B& $Q í 1.75j" '   �*****************Must be 1.75"®%½!Ç& !Ö í 1j" '  RP********************The two lines below  format columns 4 and 5 as right aligned>b<********************You could make this the whole table with¡********************Instead.À	9  Ð	æ Ü	<ç	 î	'ü		5dlg4 A 		>dlg4**************get the number of columns in the tablea 		n 	 dlgü[| Y*********The above equation simple assumes a six inch printable area;  change to 7 at max0Ø 		   í knj" '  ! !"&!Out,!
\  ZPrepares the note for export to disk - assumes no fancy formatting in the WinWord document] © Guy J. Gallodn bDistributed as FreeWare for personal use.  All corporate uses require registration with the author+Ó )219 East 69th Street, NYC 10021  ($25.00)ÿ ************* SimpleAsciiversion 1.0 July 30, 1990R7P ark:  This macro assumes that you have the "Generic / Text Only" printer driver\ŒZ ark:  installed one your system, And connected To FILE :  See Windows manual pp 162 - 164ëMAINAõO  9**********Make this 1 if you don't want them to interrupt ?4A2******************************Initialize constants*vGeneric$Generic / Text Only on FILE:¡
PageBreak$^d´	ParaMark$^pÆColumnBreak$^14ÜBlank$ 7ê5********************Force user to save if never saved#"lz Document–P	  rThe document must be saved once before exporting.  Pressing Cancel will abort CreatedFormattedAscii, OK will Save.File Export! ê		G ö	 ý		*Bye		 ><*******************Ask if they want to save a dirty documentX[P  	  %Save WinWord format before exporting?File Export$ G  Ã(Å&*************Get orginal document nameîOriginalName$v   *******Name for print file:+Fname$lv  / v  .TXT k<m:****************************Reset formatting to Normal -- ª
¹| NormalÐw ! Courier"   20**************************** Get Current Printer6/dlg4M S>dlgeOriginalPrinter$dlg/  …2‡0***************************** Set Printer to TTYºM / Generic$ à3â1***************************** Set Document format5dlg4z 3>dlgEdlgK 0j" fdlgL 1.5j" ŠdlgI 0j" ªdlgJ 0j" Íz dlg á_ã]********Remove Section marks, hard page breaks, Column Break;  replace bullets with Asterisks)C
SubReplace
PageBreak$	ParaMark$+f
SubReplaceColumnBreak$	ParaMark$ ‹'�%********************** Print the file µ6Printing to file: Fname$Ú/Fname${Enter}÷J  	I	G**********************A kludge to get the end of line terminators rightN	
]	Ù h	/{Enter}|	q Fname$�	
$ž	x     ¡ 0j"  9ß	¢ 0j" £ 0j" ¤ 0li .1
¥ 0li¦ 1li§  ¨   8|
©  ª  «  ¬  ­    Ò
4Ô
2***********Replace blank line with Blank$ constantL	
SubReplace	ParaMark$	ParaMark$	ParaMark$Blank$	ParaMark$ L<NH  Fname$Ì   ***********Save as Text w/Breaks —2™Ð  **************Close the file without savingFÑM   / OriginalPrinter$&***********Go back to original printer7'F OriginalName$#**********Open the WinWord document cYe  Load text file [Fname$] into Notepad for review?File Export$  Ä	/%foFName${enter}ê	£ notepad.exe bye 
SubReplaceS$R$1	G;C	[ Í S$Î R$Ï   Ð   Ž    ž	Ì   ¬ µ


t5dlg4z 3>dlgEdlgK 0j" fdlgL 1.5j" ŠdlgI 0j" ªdlgJ 0j" Íz dlg á_ã]********Remove Section marks, hard page breaks, Column Break;  replace bullets with Asterisks)C
SubReplace
PageBreak$	ParaMark$+f
SubReplaceColumnBreak$	ParaMark$€  ã  `  t  <  G  ­  «  ­  ’%  ”%  š2  ž2   2  üùöùöùñ ï ï                                                                                                                                                                                                                                                                                                                                                                                                                                        €  ª  ¹  ã  Y  [  B  D  :  <    ­    «  ­  ”%  œ2  ž2   2  ûûûõûõûõûõìäÞûûûûû                                                                                                                                                                                                                                                                                                                                                                               Ð         ÐÐ˜þ        Ð             ÿMessage  ÿ  2        ð x ÿ        Ð p@à€ ÀÀÀÀÀÀÀ  Þ        1   ÿÿÿÿ? 9LinePrinter  
9Courier  9Prestige Elite  CG Times (E1)   1   SimpleAsciiFormattedAscii              ç  ï)  õ)  F$;$ÿÿ FormattedAsciiCreates a formatted ascii fileSimpleAscii Create a simpler Ascii text file€ a   a     € €a       h         à=Ð/      Ð  h    Iô§%›ô§%     L                 É   Formatted AsciiExport WinWord documentexport, asciitThis template contains a single macro to save a formatted ascii file appropriate for uploading as a BBS/CIS message.Guy J. GalloGuy J. Gallo789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€�‚ƒ„…†‡ˆ‰Š‹Œ�Ž��‘’“”•–—˜™š›œ�žŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³ÿÿµ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ"ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ ›¥! Ÿ                €=  ‚=  —B                                                      B    B   B    B    B    B    B   )B    )B    )B   +B   3B    3B   CB   )B    SB   UB    UB    UB    UB    UB    UB    UB    UB    UB    UB    UB    UB    UB    UB  B —B    UB    B    UB    UB    UB                                                                                 
                                                                                                                              €=  ‚=                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         €=  ‚=  û                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
          Þ        ÿÿÿÿ        €  €=  ‚=    €  €=  ‚=      "      à=Ð/    Ð  h                                    