thanks for the grade :)
R
Main Topics
Browse All TopicsI have recorded a simple Macro to change the Page Setup of a document to 'Letter' and then Print. The Macro does not distinguish printers so I need the code to add to the MAcro to ensure that the printer used is a speified one?
Peter R Hawkes
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: R_RajeshPosted on 2004-02-28 at 03:10:45ID: 10475525
Hi PRHawkes,
use the activeprinter property
'get the current printer
curPrinter = Application.ActivePrinter
'change the active printer
Application.ActivePrinter = "HP LaserJet 4 local on LPT1:"
'print the document
ActiveDocument.PrintOut
'change back the active printer
Application.ActivePrinter = curPrinter
from word help
ActivePrinter Property
Returns or sets the name of the active printer. Read/write String.
Example
This example displays the name of the active printer.
MsgBox "The name of the active printer is " & ActivePrinter
This example makes a network HP LaserJet IIISi printer the active printer.
Application.ActivePrinter = "HP LaserJet IIISi on \\printers\laser"
This example makes a local HP LaserJet 4 printer on LPT1 the active printer.
Application.ActivePrinter = "HP LaserJet 4 local on LPT1:"
Rajesh