Notebook.Save

Save(string)

Saves the OneNote document to a file.

public void Save(string fileName)
ParameterTypeDescription
fileNameStringThe full name for the file. If a file with the specified full name already exists, the existing file is overwritten.

Exceptions

exceptioncondition
IncorrectDocumentStructureExceptionThe document structure violates specification.
UnsupportedSaveFormatExceptionRequested save format is not supported.

See Also


Save(Stream)

Saves the OneNote document to a stream.

public void Save(Stream stream)
ParameterTypeDescription
streamStreamThe stream.

Exceptions

exceptioncondition
IncorrectDocumentStructureExceptionThe document structure violates specification.
UnsupportedSaveFormatExceptionRequested save format is not supported.

See Also


Save(string, SaveFormat)

Saves the OneNote document to a file in the specified format.

public void Save(string fileName, SaveFormat format)
ParameterTypeDescription
fileNameStringThe full name for the file. If a file with the specified full name already exists, the existing file is overwritten.
formatSaveFormatThe format in which to save the document.

Exceptions

exceptioncondition
IncorrectDocumentStructureExceptionThe document structure violates specification.
UnsupportedSaveFormatExceptionRequested save format is not supported.

See Also


Save(Stream, SaveFormat)

Saves the OneNote document to a stream in the specified format.

public void Save(Stream stream, SaveFormat format)
ParameterTypeDescription
streamStreamThe stream.
formatSaveFormatThe format in which to save the document.

Exceptions

exceptioncondition
IncorrectDocumentStructureExceptionThe document structure violates specification.
UnsupportedSaveFormatExceptionRequested save format is not supported.

See Also


Save(string, NotebookSaveOptions)

Saves the OneNote document to a file using the specified save options.

public void Save(string fileName, NotebookSaveOptions options)
ParameterTypeDescription
fileNameStringThe full name for the file. If a file with the specified full name already exists, the existing file is overwritten.
optionsNotebookSaveOptionsSpecifies the options how the document is saved in file.

Exceptions

exceptioncondition
IncorrectDocumentStructureExceptionThe document structure violates specification.
UnsupportedSaveFormatExceptionRequested save format is not supported.

See Also


Save(Stream, NotebookSaveOptions)

Saves the OneNote document to a stream using the specified save options.

public void Save(Stream stream, NotebookSaveOptions options)
ParameterTypeDescription
streamStreamThe stream.
optionsNotebookSaveOptionsSpecifies the options how the document is saved.

Exceptions

exceptioncondition
IncorrectDocumentStructureExceptionThe document structure violates specification.
UnsupportedSaveFormatExceptionRequested save format is not supported.

See Also