Class WordDocumentPart
Represents a collections of sections.
Inheritance
Inherited Members
Namespace: Syncfusion.DocIO.DLS
Assembly: Syncfusion.DocIO.Base.dll
Syntax
public class WordDocumentPart
Constructors
WordDocumentPart()
Initializes a new instance of the WordDocumentPart class.
Declaration
public WordDocumentPart()
WordDocumentPart(WordDocument)
Initializes a new instance of the WordDocumentPart class and loads the content of the Word document to this instance
Declaration
public WordDocumentPart(WordDocument document)
Parameters
Type | Name | Description |
---|---|---|
WordDocument | document | The Word document to load into this WordDocumentPart |
Properties
Sections
Gets the sections in the Word document part. Read-only.
Declaration
public WSectionCollection Sections { get; }
Property Value
Type |
---|
WSectionCollection |
Methods
Close()
Closes all the contents of the document part.
Declaration
public void Close()
GetAsWordDocument()
Gets the content of document part as new Word document.
Declaration
public WordDocument GetAsWordDocument()
Returns
Type | Description |
---|---|
WordDocument | The WordDocument contains the content of this WordDocumentPart |
Load(WordDocument)
Loads the content of the Word document to this instance.
Declaration
public void Load(WordDocument document)
Parameters
Type | Name | Description |
---|---|---|
WordDocument | document | The document to load into the current word document part. |
Remarks
WordDocumentPart contains the copy of sections from the documents. When you modify the content of the WordDocumentPart, it does not affect the objects inside the document.