ActivePrinter not working in macro.

W

W2K3Newbie

We've got an application that invokes Word, executes a macro, does a merge
with data pulled from a text file extracted from a database, etc, and then
prints the merged document to a specific printer. For years we've been having
to manually set the Windows default printer on the workstations to use the
specific printer that's needed because even though the macro has the command:

ActivePrinter = "SPECPRINT"

this printer never gets used unless it is the default for the user session
upon the workstation before the macro ever gets run.

The SPECPRINT printer is defined upon each workstation and is an LPR network
printer which prints to a special print queue hostsed on a unix system which
"broadcasts" the print jobs out to about half a dozen HP laserjet printers
scattered about our network.

We'd like to get away from having to make the SPECPRINT printer be the
default printer on all the workstations becuase the users are continually
forgetting to manually pick another printer whenever they print ordinary
print jobs, and inadvertantly broadcast out those jobs to all the special
broadcast printers and waste a lot of paper.

The problem is that the "ActivePrinter" setting in the macro is getting
ignored and it doesn't seem to matter what value it's set to... the print
output just always goes to whatever the default printer is set to.

Is this a common issue with ActivePrinter? Is there a better way to
programatically direct the output to a specific print queue?
 
G

Graham Mayor

The simple code to print to an alternative printer is detailed at
http://www.gmayor.com/fax_from_word.htm however as it uses the activeprinter
call, there must be something amiss with your implementation of it. Simplest
plan is to use the macro recorder to record the process of printing to this
driver and paste the code produced into your macro.

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


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

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