Represents a Word document.

 public sealed class Document : Element
Public NotInheritable Class Document
		Inherits Element

To create a new document, use WordApplication.Create(). To open an existing document, use WordApplication.Open().

Note: Document inherits from Element and inherits a lot basic functionality from that class. Be sure to see the Element API docs when looking for specific functionality.


          //--- Create a new Word document
          WordApplication app = new WordApplication();
          Document doc = app.Create();

          //--- Open an existing Word document
          WordApplication app = new WordApplication();
          Document doc = app.Open(@"C:\sample.doc");
        

          '--- Create a new Word document
          Dim app As New WordApplication()
          Dim doc As Document = app.Create()

          '--- Open an existing Word document
          Dim app As New WordApplication()
          Dim doc As Document = app.Open("C:\sample.doc")
        

Name

Description

AutoformatType

CompatibilitySettings

ChangeTracking

DateCreated

DatePrinted

DateRevised

DefaultTabWidth

DocumentProperties

DocumentProtection

GutterPosition

HyphenSettings

MergeStylesFromTemplate

NumCharacters

NumPagesOnLastOpen

NumParagraphs

NumWords

PrintDataInFormFields

PrintFacingPages

SaveDataInFormField

Sections

Styles

UseWidowControl

ViewSettings

Watermark

Name

Description

Append(Document)

CreateDataImportProperties()

CreateFont()

CreateParagraphFormatting()

CreateTableFormatting()

GetBookmark(String)

GetVariable(String)

SetVariable(String, String)

Name

Description

Autoformat

Gutter