#1
|
|||
|
|||
Disable "Save" & "Save As" & "Print" ribbon
Hello,
I would have one more question. How is it possible to disable "Save", "Save As" and "Print" ribbon through vba? |
#2
|
||||
|
||||
You can intercept the Save, Save As & Print functions via macros named FileSave, FileSaveAs and FilePrint, respectively. If you create these as empty macros, then noting can be saved or printed via the corresponding dialogs.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
The FileSave and FileSaveAs working fine as you wrote it but the FilePrint disabling is not working for me. If I press the print button I can print it.
This is the code what I have use: Sub FilePrint() MsgBox "Function denied!", vbExclamation End Sub Do you have any idea what is the problem? |
#4
|
|||
|
|||
with this I can disable the print function:
Private WithEvents App As Word.Application Private Sub Document_Open() Set App = Application End Sub Private Sub Document_Close() Set App = Nothing End Sub Private Sub App_DocumentBeforePrint(ByVal Doc As Document, Cancel As Boolean) Cancel = True End Sub |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Disable "do you also want to save changes to the document template?" harassalog. | wornways | Word | 30 | 06-04-2016 02:32 PM |
Error: "Changes made were lost...reconnect with server", when switching "from" field | randhurrle | Outlook | 2 | 02-25-2015 06:51 PM |
When composing an e-mail how do I add "Page Layout" and "View" tabs to the ribbon | CensorTilSin | Outlook | 1 | 12-11-2013 12:05 PM |
How to choose a "List" for certain "Heading" from "Modify" tool? | Jamal NUMAN | Word | 2 | 07-03-2011 03:11 AM |
Word 2010: "Screen shot" and "Print Screen" and fitting the page boundaries! | Jamal NUMAN | Word | 4 | 06-30-2011 05:48 PM |