![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Can Wscript catch the MS Word Application Event "DocumentBeforePrint" ? My example below is unable to catch WordApplication event - DocumentBeforePrint. When the Print method is clicked or selected in MS Word, I want to trap and cancel the print action. I am trying with XP and Word 2003, however My Question is has any ever trapped this event using Wscript or Wscript ver 5.7 ? Thank you for any help. |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Can Wscript catch the MS Word Application Event "DocumentBeforePrint" ? On Wed, 10 Jun 2009 15:21:27 GMT, Harold Little wrote: Quote: > My example below is unable to catch WordApplication event - > DocumentBeforePrint. > When the Print method is clicked or selected in MS Word, > I want to trap and cancel the print action. > > I am trying with XP and Word 2003, however > My Question is has any ever trapped this event using Wscript or Wscript > ver 5.7 ? > > Thank you for any help. a new class module to Normal.dot, and put this in the class module: Public WithEvents App As Word.Application Sub App_DocumentBeforePrint(ByVal Doc As Document, ByVal Cancel As Boolean) Cancel = True End Sub Now nothing should print (but it's untested). -- A squirrel is just a rat with good PR. |
My System Specs![]() |
| | #3 (permalink) |
| | Re: Can Wscript catch the MS Word Application Event "DocumentBeforePrint" ? Thank you Tom Lavedas for answering my question. Harold "Harold Little" <harold.little@xxxxxx> wrote in message news:OG8eh8d6JHA.1716@xxxxxx Quote: > My example below is unable to catch WordApplication event - > DocumentBeforePrint. > When the Print method is clicked or selected in MS Word, > I want to trap and cancel the print action. > > I am trying with XP and Word 2003, however > My Question is has any ever trapped this event using Wscript or Wscript > ver 5.7 ? > > Thank you for any help. > |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| wscript.echo only a new line / embed a "CR" in a text string ? | VB Script | |||
| microsoft.public.windowsxp.general posts reappear after "catch up" | Live Mail | |||
| Files with extension ".doc" should be opened in Microsoft Word Application | Vista security | |||
| Files with extension ".doc" should be opened in Microsoft Word Application | Vista General | |||
| "Catch Up" vs. "Mark All Read" | Vista mail | |||