Joel Allen was telling us:
Joel Allen nous racontait que :
> Hello,
>
[quoted text clipped - 4 lines]
> It works if the printer is local, but not if it's a network printer. Is
> the code different for network printer?
See:
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
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org
Joel Allen - 03 Oct 2006 00:26 GMT
Hello Jean-Guy,
Thanks for your reply, but I didn't see anything about a network printer in
these articles. Can you please help me further?
Thanks,
Joel
> Joel Allen was telling us:
> Joel Allen nous racontait que :
[quoted text clipped - 25 lines]
> Part 4: Getting printer driver details
> http://pubs.logicalexpressions.com/Pub0009/LPMArticle.asp?ID=183
Jean-Guy Marcil - 03 Oct 2006 03:44 GMT
Joel Allen was telling us:
Joel Allen nous racontait que :
> Hello Jean-Guy,
>
> Thanks for your reply, but I didn't see anything about a network
> printer in these articles. Can you please help me further?
Did you look at this one:
Controlling the Printer from Word VBA
Part 4: Getting printer driver details
http://pubs.logicalexpressions.com/Pub0009/LPMArticle.asp?ID=183
What code are you using?
On a network. you have to specify the server and usually the port name as
well.
The page I cited above will help you make sense of this.
For example, on a local network, the following code sets the active printer:
Application.ActivePrinter = "HP DeskJet 930C on SALON on NE01:"
A quick way to figure out what to write between the quotes is to use this
code after setting the target active printer manually:
MsgBox "The name of the active printer is " & ActivePrinter

Signature
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org
Joel Allen - 03 Oct 2006 17:28 GMT
Thank you! That worked perfectly.
Joel
> Joel Allen was telling us:
> Joel Allen nous racontait que :
[quoted text clipped - 24 lines]
>
> MsgBox "The name of the active printer is " & ActivePrinter