NotebookSave

NotebookSave[notebook]
saves the current version of the specified notebook.

NotebookSave[notebook, "file"]
saves the notebook in the specified file.

NotebookSave[]
saves the current version of the current evaluation notebook in a file.

Details and OptionsDetails and Options

  • notebook must be a NotebookObject.
  • NotebookSave[notebook] saves the notebook in a file whose name is given by the notebook object notebook.
  • NotebookSave writes out the Mathematica expression corresponding to the notebook, together with Mathematica comments which make it easier for the front end to read the notebook in again.
  • NotebookSave[notebook, "file"] overwrites file without warning if it exists.
  • If the option setting Interactive->True is given, the front end will prompt the user to select a file name for the notebook.

ExamplesExamplesopen allclose all

Basic Examples (2)Basic Examples (2)

Save a new document to a specified file:

In[1]:=
Click for copyable input
In[2]:=
Click for copyable input

Modify a previously saved document and save it to the same place:

In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
In[3]:=
Click for copyable input
New in 3 | Last modified in 6
New to Mathematica? Find your learning path »
Have a question? Ask support »