I am not a big Word user, but is there a way to force two side page print in word VBA?
I am not a big Word user, but is there a way to force two side page print in word VBA?
Be fore warned, I regularly post drunk. So don't take offence (too much) to what I say.
I am the real 'Napster'
The Grid. A digital frontier. I tried to picture clusters of information as they moved through the computer. What did they look like? Ships? motorcycles? Were the circuits like freeways? I kept dreaming of a world I thought I'd never see. And then, one day...
If you receive help please give thanks. Click the * in the bottom left hand corner.
snb's VBA Help Files
Two sided printing would normally be based on the printer settings and not MS Word parameters. You can set up the printer parameters through the Page Setup facility. If there is no Front and Back option on your printer parameters, then you can manually set the printer to print every other page by using the 'Pages to Print' and making two print run with the odd pages (1, 3, 5, etc.) on one print run and the even pages (2, 4, 6, etc.) on the second run. You would then have to keep the first run organized in the correct page order and reload that batch into the feed tray blank side up for the second run.
Last edited by JLGWhiz; 10-02-2018 at 09:06 AM.
Any code provided by me should be tested on a copy or a mock up of your original data before applying it to the original. Some events in VBA cannot be reversed with the undo facility in Excel. If your original post is satisfied, please mark the thread as "Solved". To upload a file, see the banner at top of this page.
Just when I think I am smart, I learn something new!
That is going to be very hard when you are looping through a couple hundred of word files while printing them simultaneously. Hence the need to set the printer programatically.
To set it programmatically, you use the 'PageSetup' method to set the parameters, but if your printer has to have front and back capability to do that.
Disregard that. The duplex parameter is not incluced in PageSetup properties. One way to get the code is to turn on the recorder and do a manual set up. Then take the recorded code and merge it into your other code. My printer does not have duplex capability so I cannot do that for you.
Last edited by JLGWhiz; 10-02-2018 at 11:32 PM.
What does this have to do with Outlook?
Anyway, to the best of my recollection, that is one of the properties that need API calls in VBA to set prtdevmode for the printer.
Rory
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks