Notebook.Save

Save(string)

将 OneNote 文档保存到文件中。

public void Save(string fileName)
参数类型描述
fileNameString文件的完整名称。如果已存在具有指定完整名称的文件,则会覆盖现有文件。

异常

异常条件
IncorrectDocumentStructureException文档结构违反规范。
UnsupportedSaveFormatException不支持请求的保存格式。

另请参阅


Save(Stream)

将 OneNote 文档保存到流中。

public void Save(Stream stream)
参数类型描述
流。

异常

异常条件
IncorrectDocumentStructureException文档结构违反规范。
UnsupportedSaveFormatException不支持请求的保存格式。

另请参阅


Save(string, SaveFormat)

以指定格式将 OneNote 文档保存到文件中。

public void Save(string fileName, SaveFormat format)
参数类型描述
fileNameString文件的完整名称。如果已存在具有指定完整名称的文件,则会覆盖现有文件。
格式SaveFormat用于保存文档的格式。

异常

异常条件
IncorrectDocumentStructureException文档结构违反规范。
UnsupportedSaveFormatException不支持请求的保存格式。

另请参阅


Save(Stream, SaveFormat)

以指定格式将 OneNote 文档保存到流中。

public void Save(Stream stream, SaveFormat format)
参数类型描述
流。
格式SaveFormat用于保存文档的格式。

异常

异常条件
IncorrectDocumentStructureException文档结构违反规范。
UnsupportedSaveFormatException不支持请求的保存格式。

另请参阅


Save(string, NotebookSaveOptions)

使用指定的保存选项将 OneNote 文档保存到文件中。

public void Save(string fileName, NotebookSaveOptions options)
参数类型描述
fileNameString文件的完整名称。如果已存在具有指定完整名称的文件,则会覆盖现有文件。
选项NotebookSaveOptions指定文档在文件中保存的选项。

异常

异常条件
IncorrectDocumentStructureException文档结构违反规范。
UnsupportedSaveFormatException不支持请求的保存格式。

另请参阅


Save(Stream, NotebookSaveOptions)

使用指定的保存选项将 OneNote 文档保存到流中。

public void Save(Stream stream, NotebookSaveOptions options)
参数类型描述
流。
选项NotebookSaveOptions指定文档保存的选项。

异常

异常条件
IncorrectDocumentStructureException文档结构违反规范。
UnsupportedSaveFormatException不支持请求的保存格式。

另请参阅