Click to See Complete Forum and Search --> : Printing MSWord Documents from VBA
kpaske
Dec 8th, 2005, 08:43 PM
I have generated some MSWord documents, and know how to print them from my VBA code, but I would like to be able to set certain print options automatically for certain documents, such as printing in full duplex (my printer can print to both sides) and specifying which pages to print. How do I do these in VBA code, and is there a guide somewhere that lists all the available printer commands?
dglienna
Dec 8th, 2005, 08:48 PM
Here you go:
Printer Constants (http://vbforums.com/attachment.php?attachmentid=36898)
I found these, and saved them.
kpaske
Dec 8th, 2005, 09:08 PM
Thanks dglienna! That list had the constant for duplex printing. I'll try it tomorrow and let you know how it works.
Now if I could only figure out how to print specific pages...?
Hack
Dec 9th, 2005, 07:10 AM
Moved to Office Development.
kpaske
Dec 9th, 2005, 07:37 PM
How would I specific printer constants? I tried this:
Me.Printer.Duplex = acPRDPHorizontal
WordObj.PrintOut
But it didn't come out full duplex.
dglienna
Dec 9th, 2005, 07:49 PM
Try this, and see what it does:
http://support.microsoft.com/default.aspx/kb/322710/EN-US/?
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.