General discussion

Locked

Word97 - code to specify printer?

By mrmolio ·
I would like to add code to a document's Open Event to switch the active
printer. Basically, I want to be sure that, whenever the user is working
in this document, it will be sent to a specific printer, regardless of
what they've set as their default. Ideas?

Another possible issue... since Word 97 docs don't have an Activate event
(do they?), how can I ensure that, if the user has 2 or more docs open,
they haven't switched printers for another document, then come back to
mine andprinted with the wrong printer?

What's the best way to proceed?

thanks for your help,

Craig

This conversation is currently closed to new comments.

7 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Word97 - code to specify printer?

by steven_v_brown In reply to Word97 - code to specify ...

This is a simple example of how I do this:

Sub udfPrintWorkSheet()
ActivePrinter = "HP LaserJet Series II"
Application.PrintOut _
FileName:="", _
Range:=wdPrintAllDocument, _
Item:=wdPrintDocumentContent, _ Copies:=1, _
Pages:="", _
PageType:=wdPrintAllPages, _
Collate:=True, _
Background:=False, _
PrintToFile:=False
End Sub

Collapse -

Word97 - code to specify printer?

by mrmolio In reply to Word97 - code to specify ...

The question was auto-closed by TechRepublic

Collapse -

Word97 - code to specify printer?

by Lord Ago 1 In reply to Word97 - code to specify ...

I think your better bet would be to record a macro and set that to a keystroke. With this, every time that keystroke is pressed, that printer is switched to even if the printer is switched around or set/reset to the default printer. Save it in say all docs or even just the Normal doc and you should be all set.

Have Fun!!

Collapse -

Word97 - code to specify printer?

by mrmolio In reply to Word97 - code to specify ...

The question was auto-closed by TechRepublic

Collapse -

Word97 - code to specify printer?

by SanKulPune In reply to Word97 - code to specify ...

Hello mrmolio,

If you carefully follow instructions in the accompanying message to your mailbox, in no more than 10 minutes you'll be able to print a document in Word97 to its 'attached' printer (if a printer is 'attached' to the document) or to the current active printer if no printer is 'attached' to the document. It does not matter if you have multiple documents open.
I have successfully tried this solution. I would be glad to help you successfully implement this, in case you face any problems.

Your early response will be highly appreciated.

With best regards,

SanganakSakha,
Your Friend In Need.

Collapse -

Word97 - code to specify printer?

by mrmolio In reply to Word97 - code to specify ...

The question was auto-closed by TechRepublic

Collapse -

Word97 - code to specify printer?

by mrmolio In reply to Word97 - code to specify ...

This question was auto closed due to inactivity

Back to Web Development Forum
7 total posts (Page 1 of 1)  

Related Discussions

Related Forums