Word Object Model Reference (Visual Studio Tools for Office)
Document Class

Represents a Microsoft Office Word 2003 document.

Namespace: Microsoft.Office.Tools.Word
Assembly: Microsoft.Office.Tools.Word (in microsoft.office.tools.word.dll)

Syntax

Visual Basic (Declaration)
Public Class Document
	Inherits BindableComponent
	Implements IActivatable, ISupportInitializeControl, ISupportInitialize
Visual Basic (Usage)
Dim instance As Document
C#
public class Document : BindableComponent, IActivatable, ISupportInitializeControl, ISupportInitialize
Remarks

Use Globals.ThisDocument to refer to the document instance when you are outside of the Document class, but inside of the project. Globals does not work if you are in another project.

Inheritance Hierarchy

System.Object
   System.MarshalByRefObject
     System.ComponentModel.Component
       Microsoft.VisualStudio.Tools.Applications.Runtime.BindableComponent
        Microsoft.Office.Tools.Word.Document
Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
See Also

Page view tracker