]>
Commit | Line | Data |
---|---|---|
cc48c73f CE |
1 | ' This is saved as word macros; opens a pdf and writes out a ps file using |
2 | ' laserjet ps driver | |
96a9f4e8 | 3 | ' Note that the output dir and hardcoded printer must exist |
cc48c73f CE |
4 | |
5 | Sub wx_ps() | |
96a9f4e8 CE |
6 | swxWIN = Environ("WXWIN") |
7 | do_ps swxWIN & "\docs\pdf\", "wx" | |
96a9f4e8 | 8 | do_ps swxWIN & "\utils\tex2rtf\docs", "tex2rtf" |
cc48c73f CE |
9 | |
10 | bye_bye | |
11 | End Sub | |
12 | ||
13 | Sub do_ps(mydir, myfile) | |
14 | ' wx_ps Macro | |
15 | ' Macro recorded 04/05/2005 by cje2 | |
16 | ' | |
96a9f4e8 | 17 | sDAILYIN = Environ("DAILY") & "\in\" |
cc48c73f CE |
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" | |
e822c5c9 | 24 | ActiveDocument.Fields.Update |
cc48c73f CE |
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, _ | |
96a9f4e8 | 29 | OutputFileName:=sDAILYIN & myfile & ".ps", Append:=False |
cc48c73f | 30 | ActiveDocument.Close SaveChanges:=wdDoNotSaveChanges |
96a9f4e8 CE |
31 | End Sub |
32 | ||
33 | Sub bye_bye() | |
cc48c73f | 34 | |
96a9f4e8 CE |
35 | Application.Quit SaveChanges:=wdDoNotSaveChanges |
36 | ||
cc48c73f | 37 | End Sub |