Reply
 
Thread Tools Display Modes
  #1   Report Post  
maruapo maruapo is offline
Junior Member
 
Posts: 0
Default 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

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
add-in is not working in MsWord but working in powerpoint asfandtnt Microsoft Word Help 1 August 24th 09 02:51 PM
Keep with next not working Pamelagio Microsoft Word Help 8 February 22nd 07 01:54 PM
TOC not working in PDF Hlp1010 Microsoft Word Help 1 January 4th 07 07:13 PM
ASCII working/not working GillianHG Microsoft Word Help 3 February 22nd 05 06:59 PM
tab key not working DebbieF Tables 1 December 30th 04 01:40 AM


All times are GMT +1. The time now is 04:30 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"