Change Print Tray (Word 2003)

O

Orion Cochrane

We sometimes have to print stuff from our bypass tray, but we forget to reset
the default tray. I would like to write an application that alerts you that
you are on bypass and asks if you want to change it back. I typed in
DocumentBeforePrint in the Help menu and it told me that I need a Class
Module to use the DocumentBeforePrint event. Here is what I want:

Private Sub App_DocumentBeforePrint(ByVal Doc as Document, Cancel as Boolean)
Dim Tray as VBMsgBoxResult
If Options.DefaultTray <> "Use printer settings" Then
Tray = MsgBox ("Print using default tray?", vbQuestion + vbYesNo, "Printer
on Bypass Tray")
If Tray = vbYes Then Options.DefaultTray = "Use printer settings"
End If
End Sub

Please read the DocumentBefore Print Event help article to get a better
understanding of my question so you can fill in the blanks. Thanks in advance.
 

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