Trying to use PrintOut Method to print XPS file to specififed location...
Posted on 2007-04-05
I have a document called "myDocument.doc" located in the Directory "C:\Documents\Doc\". I want to write code that will print this in XPS Format (Vista) and save it to its current name, but with the .xps suffix.
I believe some form of the following will work, but I don't know how to specify the name I wish to save to:
ActivePrinter = "Microsoft XPS Document Writer"
Application.PrintOut FileName:="", Range:=wdPrintAllDocument, Item:= _
wdPrintDocumentContent, Copies:=1, Pages:="", PageType:=wdPrintAllPages, _
ManualDuplexPrint:=False, Collate:=True, Background:=True, PrintToFile:= _
False, PrintZoomColumn:=0, PrintZoomRow:=0, PrintZoomPaperWidth:=0, _