2005-09-06 13:31:17 +00:00
|
|
|
' This is saved as word macros; opens a pdf and writes out a ps file using
|
|
|
|
' laserjet ps driver
|
2005-09-08 14:02:57 +00:00
|
|
|
' Note that the output dir and hardcoded printer must exist
|
2005-09-06 13:31:17 +00:00
|
|
|
|
|
|
|
Sub wx_ps()
|
2005-09-08 14:02:57 +00:00
|
|
|
swxWIN = Environ("WXWIN")
|
|
|
|
do_ps swxWIN & "\docs\pdf\", "wx"
|
|
|
|
do_ps swxWIN & "\contrib\docs\latex\svg", "svg"
|
|
|
|
do_ps swxWIN & "\contrib\docs\latex\ogl", "ogl"
|
|
|
|
do_ps swxWIN & "\contrib\docs\latex\mmedia", "mmedia"
|
|
|
|
do_ps swxWIN & "\contrib\docs\latex\gizmos", "gizmos"
|
|
|
|
do_ps swxWIN & "\contrib\docs\latex\fl", "fl"
|
|
|
|
do_ps swxWIN & "\utils\tex2rtf\docs", "tex2rtf"
|
2005-09-06 13:31:17 +00:00
|
|
|
|
|
|
|
bye_bye
|
|
|
|
End Sub
|
|
|
|
|
|
|
|
Sub do_ps(mydir, myfile)
|
|
|
|
' wx_ps Macro
|
|
|
|
' Macro recorded 04/05/2005 by cje2
|
|
|
|
'
|
2005-09-08 14:02:57 +00:00
|
|
|
sDAILYIN = Environ("DAILY") & "\in\"
|
2005-09-06 13:31:17 +00: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 09:07:20 +00:00
|
|
|
ActiveDocument.Fields.Update
|
2005-09-06 13:31:17 +00: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 14:02:57 +00:00
|
|
|
OutputFileName:=sDAILYIN & myfile & ".ps", Append:=False
|
2005-09-06 13:31:17 +00:00
|
|
|
ActiveDocument.Close SaveChanges:=wdDoNotSaveChanges
|
2005-09-08 14:02:57 +00:00
|
|
|
End Sub
|
|
|
|
|
|
|
|
Sub bye_bye()
|
2005-09-06 13:31:17 +00:00
|
|
|
|
2005-09-08 14:02:57 +00:00
|
|
|
Application.Quit SaveChanges:=wdDoNotSaveChanges
|
|
|
|
|
2005-09-06 13:31:17 +00:00
|
|
|
End Sub
|