Notebook.LoadChildDocument

LoadChildDocument(string)

Adds a child document node. Opens an existing OneNote document from a file.

public void LoadChildDocument(string filePath)
ParameterTypeDescription
filePathStringThe file path.

Examples

Shows how to load notebook from a stream.

// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_NoteBook();

FileStream stream = new FileStream(dataDir + "Notizbuch öffnen.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");

See Also


LoadChildDocument(string, LoadOptions)

Adds a child document node. Opens an existing OneNote document from a file. Allows to specify additional load options.

public void LoadChildDocument(string filePath, LoadOptions loadOptions)
ParameterTypeDescription
filePathStringThe file path.
loadOptionsLoadOptionsThe load options.

See Also


LoadChildDocument(Stream)

Adds a child document node. Opens an existing OneNote document from a stream.

public void LoadChildDocument(Stream stream)
ParameterTypeDescription
streamStreamThe stream.

Examples

Shows how to load notebook from a stream.

// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_NoteBook();

FileStream stream = new FileStream(dataDir + "Notizbuch öffnen.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");

See Also


LoadChildDocument(Stream, LoadOptions)

Adds a child document node. Opens an existing OneNote document from a stream. Allows to specify additional load options.

public void LoadChildDocument(Stream stream, LoadOptions loadOptions)
ParameterTypeDescription
streamStreamThe stream.
loadOptionsLoadOptionsThe load options.

See Also