Results 1 to 6 of 6
  1. #1
    New Lounger
    Join Date
    Jan 2005
    Location
    Boston, Massachusetts, USA
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Prevent Printing in Word (2000/XP/2003)

    Is there a way to prevent users from clicking the 'Print' icon in the word toolbar to print documents?

    I can prevent them from doing so from the File->Print menu, but I cannot seem to override the 'Print' button on the word toolbar (Hiding the toolbar is not an option).

    An example of overriding the FilePrint is to create the following sub in a word module.

    Sub FilePrint()

    MsgBox "Not Allowed, sorry."

    End Sub

    The Macro Recorder tells me that the 'Print' button on the toolbar calls ActiveDocument.PrintOut except trying to override this as

    Sub PrintOut()
    or
    Sub ActiveDocumentPrintOut()
    or numerous other desparate attempts [img]/forums/images/smilies/wink.gif[/img] has been unsuccessful.

    I can't seem to find the Printout command listed in the built-in 'Word Commands' (under Tools>Macros>Macros in 'Word Commands' either, which leads be to believe that it is impossible to override, am I wrong?

  2. #2
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Re: Prevent Printing in Word (2000/XP/2003)

    Try

    Sub FilePrintDefault()

    StuartR

  3. #3
    New Lounger
    Join Date
    Jan 2005
    Location
    Boston, Massachusetts, USA
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Prevent Printing in Word (2000/XP/2003)

    Thanks StuartR

    That was precisely what I was looking for.

  4. #4
    Super Moderator
    Join Date
    Dec 2000
    Location
    Renton, Washington, USA
    Posts
    12,560
    Thanks
    0
    Thanked 4 Times in 4 Posts

    Re: Prevent Printing in Word (2000/XP/2003)

    But if one was to use the "Ctrl+p" keys, will this still block the printing?

    Now running HP Pavilion a6528p, with Win7 64 Bit OS.

  5. #5
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Re: Prevent Printing in Word (2000/XP/2003)

    To intercept Control-P you use

    Sub FilePrint()

    StuartR

  6. #6
    New Lounger
    Join Date
    Jan 2005
    Location
    Boston, Massachusetts, USA
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Prevent Printing in Word (2000/XP/2003)

    A good point DaveA, luckily I was already overriding the FilePrint which works in this case as StuartR points out.

    Thanks to you both for your comments.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •