Notebook.LoadChildDocument

LoadChildDocument(string)

添加子文档节点。从文件中打开现有的 OneNote 文档。

public void LoadChildDocument(string filePath)
参数类型描述
filePathString文件路径。

示例

展示如何从流加载笔记本。

// 文档目录的路径。
string dataDir = RunExamples.GetDataDir_NoteBook();

FileStream stream = new FileStream(dataDir + "Notebook.onetoc2", FileMode.Open);

var notebook = new Notebook(stream);

using (FileStream childStream = new FileStream(dataDir + "Aspose.one", FileMode.Open))
{
    notebook.LoadChildDocument(childStream);
}

notebook.LoadChildDocument(dataDir + "Sample1.one");

另请参阅


LoadChildDocument(string, LoadOptions)

添加子文档节点。从文件中打开现有的 OneNote 文档。允许指定额外的加载选项。

public void LoadChildDocument(string filePath, LoadOptions loadOptions)
参数类型描述
filePathString文件路径。
loadOptionsLoadOptions加载选项。

另请参阅


LoadChildDocument(Stream)

添加子文档节点。从流中打开现有的 OneNote 文档。

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

示例

展示如何从流加载笔记本。

// 文档目录的路径。
string dataDir = RunExamples.GetDataDir_NoteBook();

FileStream stream = new FileStream(dataDir + "Notebook.onetoc2", FileMode.Open);

var notebook = new Notebook(stream);

using (FileStream childStream = new FileStream(dataDir + "Aspose.one", FileMode.Open))
{
    notebook.LoadChildDocument(childStream);
}

notebook.LoadChildDocument(dataDir + "Sample1.one");

另请参阅


LoadChildDocument(Stream, LoadOptions)

添加子文档节点。从流中打开现有的 OneNote 文档。允许指定额外的加载选项。

public void LoadChildDocument(Stream stream, LoadOptions loadOptions)
参数类型描述
流。
loadOptionsLoadOptions加载选项。

另请参阅