Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Disable Save/Save As

Posted on 2014-03-25
7
Medium Priority
?
701 Views
Last Modified: 2014-03-31
I wanted to add a addin to Microsoft Word and Powerpoint (2010) in C# and want to programatically disable the SAVE\SAVEAS tab of WORD and POWERPOINT. Could somebody pinpoint sample code.
0
Comment
Question by:felice_minervino
7 Comments
 
LVL 18

Expert Comment

by:Dennis Aries
ID: 39955318
What is your objective? Do you want to remove the items altogether, just disable them (but keep them visible) or alter the functionality?

I think what you are looking for is to be found in altering the Ribbon with CustomUI Editor
0
 
LVL 46

Expert Comment

by:aikimark
ID: 39955645
@Dennis Aries

I have removed a link to an open question on another Q&A site from your comment, http:#a39955318

EE would like its experts to post solutions.  If you get the content from another site, then an attribution link would be expected.

aikimark -- zone advisor
0
 
LVL 76

Expert Comment

by:GrahamSkan
ID: 39955656
If a VBA macro with the same name as a Word command exists within scope, then the macro will run instead of the command, so if the macro does nothing then the Command is effectively disabled.

Put this code in your a global template such as Normal or one in the Word Startup folder
Sub Save()
End Sub
Sub SaveAs()
End Sub

Open in new window

0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 16

Accepted Solution

by:
theo kouwenhoven earned 1000 total points
ID: 39955736
Hi Felice,

Graham is almost right, you need to use the FileSave and FileSaveAs  instead of Save and SaveAs.

Then  you have still the Save option on exit, for that you need the FileSaveAll.

Check this document for more detail:
http://word.mvps.org/faqs/macrosvba/interceptsaveprint.htm

Regards,
Murph
0
 

Author Comment

by:felice_minervino
ID: 39956029
ok thanks Murph !!

i will study your suggestion.

regards
Felice
0
 
LVL 23

Expert Comment

by:JSRWilson
ID: 39958515
That approach is not going to fly in PowerPoint from 2007 (and prpbably not in C#)

I would suggest disabling / hiding the commands in XML in the CustomUI folder (assuming thios is an XML based version ie after 2003). This will work in both WORD and POWERPOINT

Just wondering how you are going to save files though!
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Ever visit a website where you spotted a really cool looking Font, yet couldn't figure out which font family it belonged to, or how to get a copy of it for your own use? This article explains the process of doing exactly that, as well as showing how…
This video shows and describes the main difference between both orientations in Microsoft Word. Viewers will understand when to use each orientation and how to get the most out of them.
Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.

885 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question