2005-09-06 09:31:17 -04:00
|
|
|
' This is saved as word macros; opens a pdf and writes out a ps file using
|
|
|
|
' laserjet ps driver
|
2005-09-08 10:02:57 -04:00
|
|
|
' Note that the output dir and hardcoded printer must exist
|
2005-09-06 09:31:17 -04:00
|
|
|
|
|
|
|
Sub wx_ps()
|
2005-09-08 10:02:57 -04:00
|
|
|
swxWIN = Environ("WXWIN")
|
|
|
|
do_ps swxWIN & "\docs\pdf\", "wx"
|
|
|
|
do_ps swxWIN & "\utils\tex2rtf\docs", "tex2rtf"
|
2005-09-06 09:31:17 -04:00
|
|
|
|
|
|
|
bye_bye
|
|
|
|
End Sub
|
|
|
|
|
|
|
|
Sub do_ps(mydir, myfile)
|
|
|
|
' wx_ps Macro
|
|
|
|
' Macro recorded 04/05/2005 by cje2
|
|
|
|
'
|
2005-09-08 10:02:57 -04:00
|
|
|
sDAILYIN = Environ("DAILY") & "\in\"
|
2005-09-06 09:31:17 -04:00
|
|
|
ChangeFileOpenDirectory mydir
|
|
|
|
Documents.Open FileName:=myfile & ".rtf", ConfirmConversions:=False, ReadOnly:= _
|
|
|
|
False, AddToRecentFiles:=False, PasswordDocument:="", PasswordTemplate:= _
|
|
|
|
"", Revert:=False, WritePasswordDocument:="", WritePasswordTemplate:="", _
|
|
|
|
Format:=wdOpenFormatAuto
|
|
|
|
ActivePrinter = "\\biolpc22\laserjet"
|
2006-10-30 04:07:20 -05:00
|
|
|
ActiveDocument.Fields.Update
|
2005-09-06 09:31:17 -04:00
|
|
|
Application.PrintOut FileName:="", Range:=wdPrintAllDocument, Item:= _
|
|
|
|
wdPrintDocumentContent, Copies:=1, Pages:="", PageType:=wdPrintAllPages, _
|
|
|
|
Collate:=True, Background:=False, PrintToFile:=True, PrintZoomColumn:=0, _
|
|
|
|
PrintZoomRow:=0, PrintZoomPaperWidth:=0, PrintZoomPaperHeight:=0, _
|
2005-09-08 10:02:57 -04:00
|
|
|
OutputFileName:=sDAILYIN & myfile & ".ps", Append:=False
|
2005-09-06 09:31:17 -04:00
|
|
|
ActiveDocument.Close SaveChanges:=wdDoNotSaveChanges
|
2005-09-08 10:02:57 -04:00
|
|
|
End Sub
|
|
|
|
|
|
|
|
Sub bye_bye()
|
2005-09-06 09:31:17 -04:00
|
|
|
|
2005-09-08 10:02:57 -04:00
|
|
|
Application.Quit SaveChanges:=wdDoNotSaveChanges
|
|
|
|
|
2005-09-06 09:31:17 -04:00
|
|
|
End Sub
|