Printing from VBA with Word

Spooky

Registered User.
Local time
Today, 09:56
Joined
Jun 11, 2012
Messages
18
I have a Word VBA project that outputs multiple word documents and I wish to print (x) number of docs to the default printer (which could be any number of printers)

Im using this basic code to do so (with limited success)

Code:
            ActiveDocument.PrintOut _
            Background:=True, _
            Item:=wdPrintDocumentContent, _
            Copies:=lngCopies, _
            PageType:=wdPrintAllPages, _
            PrintToFile:=False, _
            Collate:=True, _
            ManualDuplexPrint:=False
The questions are:
A) Can I select a tray?
B) Can I print double sided?
C) Can I select color?

I am trying to work out a definitive list of what VBA can modify that isnt controlled by the printer drivers.
I have googled it to death and Uncle Google seems to suggest no to all of the above, so any tips to the contrary would be appreciated.
 
It's my experience with many databases using Word automation, that there is nothing VBA that I can generate using macro recording in Word, that cannot be transported to Access VBA.

(Having claimed that, we'll see if anyone has found a black swan.)

In Access, you need to set a reference to Word (if you are not using late binding) and preface each vba line with an instantiated Word application object.

There's countless examples of such coding in this forum and elsewhere. Also code to change the default printer.
 
Thanks for the link, not available under Word VBA though?
 
Sorry - I thought the code was in MS-Access, because it is a Forum for MS-Access! :) :)
 

Users who are viewing this thread

Back
Top Bottom