Send PDF to print w/o changing Windows default printer?

The Amyuni PDF Converter is our Printer Driver that enables you to convert any documents to PDF format. If you have any questions about installing and using the Amyuni PDF Converter please post them here.
Post Reply
let98007
Posts: 17
Joined: Thu Oct 04 2007
Location: WA

Send PDF to print w/o changing Windows default printer?

Post by let98007 »

Is there any way to direct Word to send a document to the PDF Converter without changing the Windows defult printer setting? I'm using the Word dialog (wdDialogFilePrintSetup=97) to send output to an app-specific physical device while leaving the Windows default setting unchanged and it works well. However, the same technique doesn't work with the PDF converter. The .ActiveDocument.Printout() command hangs.
Rich
Posts: 76
Joined: Thu Jun 16 2011

Re: Send PDF to print w/o changing Windows default printer?

Post by Rich »

When printing msWord documents we suggest that you change Word’s active printer property instead of changing the system’s default property. We suggest this for any application that exposes the active printer property.

Below is a pseudo code snippet that should help.

//Get and store the current activeprinter
strCurrentActivePrinter = oWord.ActivePrinter;

//Assign new activeprinter to Word
oWord.ActivePrinter = PDFprinter;

//print your word document
oDoc.PrintOut(…….)

//Reset activerprinter
oWord.ActivePrinter = strCurrentActivePrinter;
Efficient and accurate conversion to PDF, XPS, PDF/A and more. Free trials at - http://www.amyuni.com
Post Reply