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 & "\utils\tex2rtf\docs", "tex2rtf"
13 Sub do_ps(mydir, myfile)
15 ' Macro recorded 04/05/2005 by cje2
17 sDAILYIN = Environ("DAILY") & "\in\"
18 ChangeFileOpenDirectory mydir
19 Documents.Open FileName:=myfile & ".rtf", ConfirmConversions:=False, ReadOnly:= _
20 False, AddToRecentFiles:=False, PasswordDocument:="", PasswordTemplate:= _
21 "", Revert:=False, WritePasswordDocument:="", WritePasswordTemplate:="", _
22 Format:=wdOpenFormatAuto
23 ActivePrinter = "\\biolpc22\laserjet"
24 ActiveDocument.Fields.Update
25 Application.PrintOut FileName:="", Range:=wdPrintAllDocument, Item:= _
26 wdPrintDocumentContent, Copies:=1, Pages:="", PageType:=wdPrintAllPages, _
27 Collate:=True, Background:=False, PrintToFile:=True, PrintZoomColumn:=0, _
28 PrintZoomRow:=0, PrintZoomPaperWidth:=0, PrintZoomPaperHeight:=0, _
29 OutputFileName:=sDAILYIN & myfile & ".ps", Append:=False
30 ActiveDocument.Close SaveChanges:=wdDoNotSaveChanges
35 Application.Quit SaveChanges:=wdDoNotSaveChanges