Network Activeprinter

D

Dudley

I am trying to make a network printer the active printer, but I cannot find
the printer. It is called 'HP LaserJet P2015 Series PCL 6 on DUDLEY' and the
port is //DUDLEY/Printer2. I have tried 'HP LaserJet P2015 Series PCL 6 on
//DUDLEY/Printer2' without success. Can anyone advise?

Thanks
Dudley
 
J

Jay Freedman

Dudley said:
I am trying to make a network printer the active printer, but I
cannot find the printer. It is called 'HP LaserJet P2015 Series PCL 6
on DUDLEY' and the port is //DUDLEY/Printer2. I have tried 'HP
LaserJet P2015 Series PCL 6 on //DUDLEY/Printer2' without success.
Can anyone advise?

Thanks
Dudley

Use backslashes instead of forward slashes:

'HP LaserJet P2015 Series PCL 6 on \\DUDLEY\Printer2'

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
D

Dudley

Thanks for your help. I have tried this and I get the same problem. Is there
any way I can find out how the printer name should be shown?

Thanks
Dudley
 
D

Dudley

Thanks very much for the advice. This gives the printer name as 'HP LaserJet
P2015 Series PCL 6 on DUDLEY', which was the first thing I tried and gives
'Runtime error 5216. There is a printer error' - even though a local printer
name does not give an error. My current work around is to put in the local
printer (which is not working) and then change the default printer in Printer
Settings, although it may be better to physically change round the cables so
that the printer used by the macro is the local printer.

Thanks
Dudley
 
D

Dudley

Thanks very much for your help. I have looked at the page but I think that as
there is no easy solution, it will be best to live with the problem until I
can get the local printer sorted out. For information, the link to Jonathan
West's printer information is broken.

Thanks
Dudley
 
J

Jay Freedman

First use the Windows printer dialog to make that your Windows default
printer, then start Word and look at the Print dialog to make sure it
also sees that printer as the default. I believe the content of the
Name box in that dialog is what you need. To double-check, though,
open the Immediate window in the VBA editor and type

?ActivePrinter

and press Enter. It appears that you get the same name followed by
"on" and the port. If the name alone doesn't work, try the whole
name-on-port string.

You might be interested in
http://www.word.mvps.org/FAQs/MacrosVBA/ChangeCurPrinter.htm although
it doesn't discuss the format of the printer name.
 
G

Graham Mayor

Thanks for the feedback. I have fixed the broken link. Refresh the page and
try the link again.

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


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
D

Dudley

Thanks very much. ?ActivePrinter in the immediate window gave the answer. It
gave the printer as 'LaserJet P2015 Series PCL 6 on NEO3:' - which is
different from how it is shown anywhere else and the macro recognised.

Dudley
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top