Send PDF to print w/o changing Windows default printer?
Send PDF to print w/o changing Windows default printer?
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.
Re: Send PDF to print w/o changing Windows default printer?
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;
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