1 ' This is saved as word macros; opens a pdf and writes out a ps file using
3 ' Note that the output dir and hardcoded printer must exist
6 swxWIN = Environ("WXWIN")
7 do_ps swxWIN & "\docs\pdf\", "wx"
8 do_ps swxWIN & "\contrib\docs\latex\svg", "svg"
9 do_ps swxWIN & "\contrib\docs\latex\ogl", "ogl"
10 do_ps swxWIN & "\contrib\docs\latex\mmedia", "mmedia"
11 do_ps swxWIN & "\contrib\docs\latex\gizmos", "gizmos"
12 do_ps swxWIN & "\contrib\docs\latex\fl", "fl"
13 do_ps swxWIN & "\utils\tex2rtf\docs", "tex2rtf"
18 Sub do_ps(mydir, myfile)
20 ' Macro recorded 04/05/2005 by cje2
22 sDAILYIN = Environ("DAILY") & "\in\"
23 ChangeFileOpenDirectory mydir
24 Documents.Open FileName:=myfile & ".rtf", ConfirmConversions:=False, ReadOnly:= _
25 False, AddToRecentFiles:=False, PasswordDocument:="", PasswordTemplate:= _
26 "", Revert:=False, WritePasswordDocument:="", WritePasswordTemplate:="", _
27 Format:=wdOpenFormatAuto
28 ActivePrinter = "\\biolpc22\laserjet"
29 Application.PrintOut FileName:="", Range:=wdPrintAllDocument, Item:= _
30 wdPrintDocumentContent, Copies:=1, Pages:="", PageType:=wdPrintAllPages, _
31 Collate:=True, Background:=False, PrintToFile:=True, PrintZoomColumn:=0, _
32 PrintZoomRow:=0, PrintZoomPaperWidth:=0, PrintZoomPaperHeight:=0, _
33 OutputFileName:=sDAILYIN & myfile & ".ps", Append:=False
34 ActiveDocument.Close SaveChanges:=wdDoNotSaveChanges
39 Application.Quit SaveChanges:=wdDoNotSaveChanges