WordprocessingDocument.AddMainDocumentPart Method

Creates the MainDocumentPart and add it to this document.

Namespace:  DocumentFormat.OpenXml.Packaging
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

Syntax

'Declaration
Public Function AddMainDocumentPart As MainDocumentPart
'Usage
Dim instance As WordprocessingDocument
Dim returnValue As MainDocumentPart

returnValue = instance.AddMainDocumentPart()
public MainDocumentPart AddMainDocumentPart()

Return Value

Type: DocumentFormat.OpenXml.Packaging.MainDocumentPart
The newly added MainDocumentPart.

See Also

Reference

WordprocessingDocument Class

WordprocessingDocument Members

DocumentFormat.OpenXml.Packaging Namespace