Home |
Search |
Today's Posts |
#1
|
|||
|
|||
DocumentBeforePrint not working
I'm trying to force a dialog box to appear when users press Print on Word 2003. I know all about DocumentBeforePrint, and have spent hours looking at the Microsoft Help topics, but despite scouring the Net and double-triple-quadruple checking my code, my code doesn't err out but it doesn't work either (docs print fine without any dialog box appearing). I've created a Class Module called "EventClassModule" and referenced it in a Module. Could it be related to my being on a huge corporate network and the printers are shared? I'm out of ideas; this code should work. Why doesn't it?
Here's what's in my 'regular' module: Sub Register_Event_Handler() Dim x As New EventClassModule Set x.v = Word.Application End Sub Here's what's in the Class Module: Public WithEvents v As Word.Application Private Sub v_DocumentBeforePrint(ByVal Doc As Document, Cancel As Boolean) Dim intResponse As Integer intResponse = MsgBox("Has the Last Revised Date been updated?",vbYesNo) If intResponse = vbNo Then Cancel = True End Sub |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
add-in is not working in MsWord but working in powerpoint | Microsoft Word Help | |||
Keep with next not working | Microsoft Word Help | |||
TOC not working in PDF | Microsoft Word Help | |||
ASCII working/not working | Microsoft Word Help | |||
tab key not working | Tables |