O
Orion Cochrane
I was trying to write a DocumentBeforePrint macro, and it wouldn't work. I
was told by the VBA Help menu that I should use a Class Module and put some
stuff in there. Basically, 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, "Print")
If Tray = vbYes Then Options.DefaultTray = "Use printer settings"
End If
I do not understand how to work with Class Modules, so if you can fill in
the blanks, that would be great.
PS: Type in DocumentBeforePrint in VBA Help to see what I am talking about.
was told by the VBA Help menu that I should use a Class Module and put some
stuff in there. Basically, 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, "Print")
If Tray = vbYes Then Options.DefaultTray = "Use printer settings"
End If
I do not understand how to work with Class Modules, so if you can fill in
the blanks, that would be great.
PS: Type in DocumentBeforePrint in VBA Help to see what I am talking about.