Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / June 2005

Tip: Looking for answers? Try searching our database.

Help - Disable Printing

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
venukus@gmail.com - 12 May 2005 15:28 GMT
Hi all,

 I am writing a COM Add-in for Word 2000.

 I assume the code below should disable printing,

 Private Sub App_DocumentBeforePrint(ByVal Doc As Word.Document, ByRef
Cancel As Boolean) Handles App.DocumentBeforePrint
          MsgBox("Printing is disabled")
       Cancel = True
   End Sub

 But I can see the message saying "Printing is disabled" but the print
command carries on and the document is printed. I have seen most of the
earlier postings but no one seem to have such a problem.

 Any help is appreciated.

Thanks in Advance,
Venu Gopal
Word Heretic - 01 Jun 2005 08:21 GMT
G'day venukus@gmail.com,

Your routine runs BEFORE the print, it does not DO the print.

Sub FilePrint()
MsgBox "Printing has been disabled."
End Sub

Steve Hudson - Word Heretic

steve from wordheretic.com (Email replies require payment)
Without prejudice

venukus@gmail.com reckoned:

>Hi all,
>
[quoted text clipped - 16 lines]
>Thanks in Advance,
>Venu Gopal
Doug Robbins - 04 Jun 2005 06:10 GMT
In Addition to Steve's response, you will also need a macro
FilePrintDefault() to trap the user's use of the print button on the
toolbar.  You may also want to have one FilePrintPreview() as well.

Signature

Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

> Hi all,
>
[quoted text clipped - 16 lines]
> Thanks in Advance,
> Venu Gopal
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.