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 / July 2007

Tip: Looking for answers? Try searching our database.

Disable word "Save As" for a specific document

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Sun - 26 Jul 2007 07:06 GMT
I was trying to disable the "save as" feature in a word document

and I wrote the code:

CommandBars("Menu Bar").Controls("File").Controls("Save As").Enabled = False

it works but the button stay disabled after I close the word and open it
again.

Is that anyway to disable the "Save As" button only for the specific
document which means didn't cross word session

P.S.

I will finally put this in my C++ application, which open the specific
document and i want user only save the existing document in my system instead
of save as.
Pranav Vaidya - 26 Jul 2007 08:44 GMT
you will have to override Word application's 'DocumentOpen' and
'DocumentBeforeclose' event and write code for this. In the code for open
event check for the specific document and disable the menu item. similarly,
for the close item enable it again.

for more details refer to

http://www.word.mvps.org/FAQs/MacrosVBA/AppClassEvents.htm
OR
http://msdn2.microsoft.com/en-us/library/aa188758(office.10).aspx
Signature

Pranav Vaidya
VBA Developer
PN, MH-India

> I was trying to disable the "save as" feature in a word document
>
[quoted text clipped - 13 lines]
> document and i want user only save the existing document in my system instead
> of save as.
Graham Mayor - 26 Jul 2007 14:11 GMT
But it won't stop someone who wants to save the document with a new name
from doing so. It will just get in the way of doing so for a short while.

Signature

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor -  Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

> you will have to override Word application's 'DocumentOpen' and
> 'DocumentBeforeclose' event and write code for this. In the code for
[quoted text clipped - 25 lines]
>> specific document and i want user only save the existing document in
>> my system instead of save as.
 
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.