WordprocessingDocument class
Office 2013 and later
Defines WordprocessingDocument - an OpenXmlPackage represents a Word document.
System.Object
DocumentFormat.OpenXml.Packaging.OpenXmlPartContainer
DocumentFormat.OpenXml.Packaging.OpenXmlPackage
DocumentFormat.OpenXml.Packaging.WordprocessingDocument
DocumentFormat.OpenXml.Packaging.OpenXmlPartContainer
DocumentFormat.OpenXml.Packaging.OpenXmlPackage
DocumentFormat.OpenXml.Packaging.WordprocessingDocument
Namespace: DocumentFormat.OpenXml.Packaging
Assembly: DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)
The following example shows how to apply the "Heading3" style to the first paragraph in an existing word processing document. To run the code example, create a word-processing file and write some text in it. After you run the code example, examine the text in the file. You would notice that the style of the first paragraph is changed to “Heading3.”
Show: