Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Duplex printing a word document from a visual basic app

Status
Not open for further replies.

moria

Programmer
Jan 10, 2002
2
CA
I am running mailmerge letters from a visual basic application and would like to print them duplexed. The ManualDuplexPrint option of the printout method is not available in the US english version of word and when I set the printer object to print duplex it ignores it. The only way I can print duplex is to phyically set the printer options for each letter. I would like to be able to set the printer to print duplex from code, but nothing I have tried works. I have searched the web and have not found any thing that would help me. Any help would be appreciated.
Thanks
 
I think the best way to deal with this is if you set up a second configuration of your printer with the Duplex option set to on. You can have your code send output to that particular 'Printer'.

You can set up as many configurations as you like for a printer and as far as Windows is concerned they are different printers.
Code:
    strPrinter = Application.ActivePrinter
    Application.ActivePrinter = "Duplex"
    ' Process Printing
     Application.ActivePrinter = strPrinter

where "Duplex" is the name of the Duplex configuration.

Just to be sure to get the name correct, record a macro which involves changing to the printer, as you may need to add the port name , e.g. "LaserJet V (Duplex) on LPT1:"

AC
 
Thank you,
I really wish it would have worked but this thing seems to ignore everything I try, I even tried using an API function to change the printer settings and still no duplex :(
Thanks again, any other suggestions?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top