Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / August 2006

Tip: Looking for answers? Try searching our database.

printing to multiple printers with macro?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ratedr - 08 Aug 2006 19:43 GMT
Is there a macro that I could write that could print a MS word file to
one printer, and then also print it to another printer .  Both printers
are remote / network printers
Dave Lett - 08 Aug 2006 19:53 GMT
Hi,

You can probably use something like the following:

Dim sDefault As String
Dim sOtherPrint As String

sDefault = Application.ActivePrinter
sOtherPrint = "\\PRINTERS\WestBW on NE03:"

'''print the document with default printer
ActiveDocument.PrintOut
'''change the active printer
Application.ActivePrinter = sOtherPrint
'''print the document with the other printer
ActiveDocument.PrintOut

'''reset the defualt printer
Application.ActivePrinter = sDefault

HTH,
Dave

> Is there a macro that I could write that could print a MS word file to
> one printer, and then also print it to another printer .  Both printers
> are remote / network printers
Ratedr - 08 Aug 2006 21:29 GMT
does this look right?  it doesnt seem to be printing correctly
Dim sDefault As String
Dim sOtherPrint As String

sDefault = "\\UPSCOMP\UPS Thermal 2543"
sOtherPrint = "\\3MACHINECONTROL\UPS"

'''print the document with default printer
ActiveDocument.PrintOut
'''change the active printer
Application.ActivePrinter = sOtherPrint
'''print the document with the other printer
ActiveDocument.PrintOut

'''reset the defualt printer
Application.ActivePrinter = sDefault

> Hi,
>
[quoted text clipped - 22 lines]
> > one printer, and then also print it to another printer .  Both printers
> > are remote / network printers
Doug Robbins - Word MVP - 09 Aug 2006 04:38 GMT
See the following articles "Changing the selected (current) printer in Word
without changing the system default printer" at:

http://www.word.mvps.org/FAQs/MacrosVBA/ChangeCurPrinter.htm

Controlling the Printer from Word VBA
Part 1: Using VBA to Select the Paper Tray
http://pubs.logicalexpressions.com/Pub0009/LPMArticle.asp?ID=101

Controlling the Printer from Word VBA
Part 2: Using VBA to control Duplex, Color Mode and Print Quality
http://pubs.logicalexpressions.com/Pub0009/LPMArticle.asp?ID=116

Controlling the Printer from Word VBA
Part 3: Dealing with Different Paper Sizes
http://pubs.logicalexpressions.com/Pub0009/LPMArticle.asp?ID=132

Controlling the Printer from Word VBA
Part 4: Getting printer driver details
http://pubs.logicalexpressions.com/Pub0009/LPMArticle.asp?ID=183

Signature

Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

> does this look right?  it doesnt seem to be printing correctly
> Dim sDefault As String
[quoted text clipped - 39 lines]
>> > one printer, and then also print it to another printer .  Both printers
>> > are remote / network printers
Ratedr - 09 Aug 2006 11:23 GMT
I looked through those, and unless Im just missing it, I dont see how
to print to multiple printers, just to multiple trays, or to one
printer that isnt the default printer

> See the following articles "Changing the selected (current) printer in Word
> without changing the system default printer" at:
[quoted text clipped - 68 lines]
> >> > one printer, and then also print it to another printer .  Both printers
> >> > are remote / network printers
Graham Mayor - 09 Aug 2006 14:04 GMT
Dave Lett's original reply covered the methodology of changing the active
printer. The syntax relating to the printer name is quite specific - I would
suggest recording a print to the alternative printer and copy the resulting
code to sOtherPrint. sDefault is the current active printer and this is
restored after printing the document.

Signature

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor -  Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

> I looked through those, and unless Im just missing it, I dont see how
> to print to multiple printers, just to multiple trays, or to one
[quoted text clipped - 72 lines]
>>>>> file to one printer, and then also print it to another printer .
>>>>> Both printers are remote / network printers
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.