menu

WPF

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class WordDocumentPart - WPF API Reference | Syncfusion

    Show / Hide Table of Contents

    Class WordDocumentPart

    Represents a collections of sections.

    Inheritance
    System.Object
    WordDocumentPart
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    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.

    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved