Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How to make a particular notebook not savable? Optionally, how to do this by evaluating a command in the notebook?

share|improve this question
up vote 6 down vote accepted

Using the menu item Preferences / Advanced / Option Inspector you can easily do that, or from within the notebook evaluate:

SetOptions[InputNotebook[], Saveable -> False]

will do what you want. However, notice that Save As still works (not sure if it has to or if this is an intelligent design decision).

share|improve this answer
If "Save As" is used and the new file name overwrites the current file, then it means the users deliberately wants to do that? – qazwsx May 7 '13 at 19:30
So how to do this from menu (not by evaluating a command)? – qazwsx May 7 '13 at 19:31
@Problemania It is possible to modify the menu items as well, but it is global and it would make for terrible UX and I'd hate if someone were to design a package/application that disabled "Save As" for me. So why don't you actually explain more on why you require this? There are possibly other better ways of achieving what you want – R. M. May 7 '13 at 19:36
Yes, documentation notebooks and default stylesheets have Saveable -> False – R. M. May 7 '13 at 19:41
SetOptions[InputNotebook[], Saveable -> True, NotebookEventActions :> {{"MenuCommand", "Save"} :> Export[StringReplace[NotebookFileName[], ".nb" -> "good.nb"], EvaluationNotebook[], "NB"]}] – Rolf Mertig Nov 16 '13 at 21:54

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.