DocumentBase Class
Provides the base class for the ThisDocument class in document-level projects for Microsoft Office Word.
Inheritance Hierarchy
System.Object
Microsoft.Office.Tools.Word.DocumentBase
Namespace: Microsoft.Office.Tools.Word
Assembly: Microsoft.Office.Tools.Word.v4.0.Utilities (in Microsoft.Office.Tools.Word.v4.0.Utilities.dll)
Syntax
'Declaration
Public MustInherit Class DocumentBase _
Implements IDocumentExtension, IExtension, EntryPoint, ISupportInitialize, _
IBindableComponent, IComponent, IDisposable, ICachedDataPersistanceCallback
public abstract class DocumentBase : IDocumentExtension,
IExtension, EntryPoint, ISupportInitialize, IBindableComponent, IComponent,
IDisposable, ICachedDataPersistanceCallback
The DocumentBase type exposes the following members.
Constructors
Name | Description | |
---|---|---|
DocumentBase | Infrastructure. |
Top
Properties
Name | Description | |
---|---|---|
_CodeName | Infrastructure. | |
ActiveTheme | Gets the name of the active theme plus the theme formatting options for the document. | |
ActiveThemeDisplayName | Gets the display name of the active theme for the document. | |
ActiveWindow | Gets a Window that represents the active window. | |
ActiveWritingStyle | ||
Application | Gets an Application that represents the creator of the document. | |
AttachedTemplate | Gets or sets a Template that represents the template attached to the document. | |
AutoFormatOverride | Gets or sets a value that indicates whether automatic formatting options override formatting restrictions in a document where formatting restrictions are in effect. | |
AutoHyphenation | Gets or sets a value that indicates whether automatic hyphenation is turned on for the specified document. | |
Background | Gets or sets a Shape that represents the background image for the specified document. | |
Base | Gets the Document object that this DocumentBase object extends. | |
Bibliography | Gets the bibliography references contained within the document. | |
BindingContext | Infrastructure. | |
Bookmarks | Gets a Microsoft.Office.Interop.Word.Bookmarks collection that represents all the bookmarks in the document. | |
BuiltInDocumentProperties | Gets a DocumentProperties collection that represents all the built-in document properties for the document. | |
Characters | Gets a Characters collection that represents the characters in the document. | |
ChildNodeSuggestions | Gets an XMLChildNodeSuggestions collection that represents the list of allowed elements for the DocumentBase (which returns the root elements for all attached schemas) or for the XMLNode object (which returns the child elements of a specified element). | |
ClickAndTypeParagraphStyle | Gets or sets the default paragraph style applied to text by the Click and Type feature in the document. | |
CoAuthoring | Represents co-authoring-related functionality in the document. | |
CodeName | Infrastructure. | |
CommandBars | Gets a CommandBars collection that represents the menu bar and all the toolbars in Microsoft Office Word. | |
Comments | Gets a Comments collection that represents all the comments in the document. | |
Compatibility | Gets a value that indicates whether the specified compatibility option is enabled. | |
CompatibilityMode | Gets a value that specifies the compatibility mode that Word uses when opening the document. | |
ConsecutiveHyphensLimit | Gets or sets the maximum number of consecutive lines that can end with hyphens. | |
Container | Gets the container application for the document. | |
Content | Gets a Range that represents the main document story. | |
ContentControls | Gets the collection of all the content controls in the document. | |
ContentTypeProperties | Gets the metadata that is stored in a document, such as author name, subject, and company. | |
Controls | Gets the collection of managed controls that are contained on the document. | |
Creator | Gets the application in which the document was created. | |
CurrentRsid | Gets a random number that Microsoft Office Word assigns to changes in the document. | |
CustomDocumentProperties | Gets a DocumentProperties collection that represents all the custom document properties for the document. | |
CustomXMLParts | Returns the custom XML parts in the document. | |
DataBindings | Infrastructure. | |
DataHost | Infrastructure. | |
DefaultTableStyle | Gets the table style that is applied to all newly created tables in the document. | |
DefaultTabStop | Gets or sets the interval (in points) between the default tab stops in the document. | |
DefaultTargetFrame | Gets or sets the browser frame in which to display a Web page reached through a hyperlink. | |
DisableFeatures | Gets or sets a value that indicates whether all features introduced after the version specified in the DisableFeaturesIntroducedAfter property are disabled. | |
DisableFeaturesIntroducedAfter | Gets or sets a value that determines whether all features introduced after a specified version of Microsoft Office Word are disabled in the document only. | |
DocID | Infrastructure. | |
DocumentInspectors | Gets a Microsoft.Office.Core.DocumentInspectors object that you can use to locate hidden personal information, such as author name, company name, and revision date. | |
DocumentLibraryVersions | Gets a DocumentLibraryVersions collection that represents the collection of versions of a shared document that has versioning enabled and that is stored in a document library on a server. | |
DocumentTheme | Gets the Microsoft Office theme that is applied to the document. | |
DoNotEmbedSystemFonts | Gets or sets a value that indicates whether Microsoft Office Word embeds common system fonts. | |
Gets an Email object that contains all the e-mail–related properties of the document. | ||
EmbedLinguisticData | Gets or sets a value that indicates whether Microsoft Office Word embeds speech and handwriting and controls text service data received from devices connected to Microsoft Office using the Windows Text Service Framework Application Programming Interface. | |
EmbedSmartTags | Gets or sets a value that indicates whether Microsoft Office Word saves the smart tag information in a document. This type or member is intended to be used only in projects for the 2007 Microsoft Office system. Smart tags are deprecated in Office 2010. . |
|
EmbedTrueTypeFonts | Gets or sets a value that indicates whether Microsoft Office Word embeds TrueType fonts in a document when the document is saved. | |
EncryptionProvider | Gets or sets the name of the algorithm encryption provider that Microsoft Office Word uses when encrypting documents. | |
Endnotes | Gets an Endnotes collection that represents all the endnotes in the document. | |
EnforceStyle | Gets or sets a value that indicates whether formatting restrictions are enforced in a protected document. | |
Envelope | Gets an Envelope that represents envelope functionality and the envelope in the document. | |
FarEastLineBreakLanguage | Gets or sets the East Asian language to use when breaking lines of text in the document. | |
FarEastLineBreakLevel | Gets or sets the line break control level for the specified document. | |
Fields | Gets a read-only Fields collection that contains the fields in the main text story. | |
Final | Gets or sets a value that indicates whether the document is final. | |
Footnotes | Gets a Footnotes collection that represents all the footnotes in the document. | |
FormattingShowClear | Gets or sets a value that indicates whether Microsoft Office Word shows Clear Formatting in the Styles and Formatting task pane. | |
FormattingShowFilter | Gets or sets a WdShowFilter constant that represents the styles and formatting displayed in the Styles and Formatting task pane. | |
FormattingShowFont | Gets or sets a value that indicates whether Microsoft Office Word displays font formatting in the Styles and Formatting task pane. | |
FormattingShowNextLevel | Gets or sets a value that indicates whether Microsoft Office Word shows the next heading level when the previous heading level is used. | |
FormattingShowNumbering | Gets or sets a value that indicates whether Microsoft Office Word displays number formatting in the Styles and Formatting task pane. | |
FormattingShowParagraph | Gets or sets a value that indicates whether Microsoft Office Word displays paragraph formatting in the Styles and Formatting task pane. | |
FormattingShowUserStyleName | Gets or sets a value that indicates whether to show user-defined styles. | |
FormFields | Gets a FormFields collection that represents all the form fields in the document. | |
FormsDesign | Gets a value that indicates whether the document is in form design mode. | |
Frames | Gets a Frames collection that represents all the frames in the document. | |
Frameset | Gets a Frameset that represents an entire frames page or a single frame on a frames page. | |
FullName | Gets the name of the document, including the drive or Web path. | |
GrammarChecked | Gets or sets a value that indicates whether a grammar check has been run on the document. | |
GrammaticalErrors | Gets a ProofreadingErrors collection that represents the sentences that failed the grammar check on the document. | |
GridDistanceHorizontal | Gets or sets the amount of horizontal space between the invisible gridlines that Microsoft Office Word uses when you draw, move, and resize AutoShapes or East Asian characters in the document. | |
GridDistanceVertical | Gets or sets the amount of vertical space between the invisible gridlines that Microsoft Office Word uses when you draw, move, and resize AutoShapes or East Asian characters in the document. | |
GridOriginFromMargin | Gets or sets a value that indicates whether Microsoft Office Word starts the character grid from the upper-left corner of the page. | |
GridOriginHorizontal | Gets or sets the point, relative to the left edge of the page, where you want the invisible grid for drawing, moving, and resizing AutoShapes or East Asian characters to begin in the document. | |
GridOriginVertical | Gets or sets the point, relative to the top of the page, where you want the invisible grid for drawing, moving, and resizing AutoShapes or East Asian characters to begin in the document. | |
GridSpaceBetweenHorizontalLines | Gets or sets the interval at which Microsoft Office Word displays horizontal character gridlines in print layout view. | |
GridSpaceBetweenVerticalLines | Gets or sets the interval at which Microsoft Office Word displays vertical character gridlines in print layout view. | |
HasMailer | Infrastructure. | |
HasPassword | Gets a value that indicates whether a password is required to open the document. | |
HasRoutingSlip | Gets or sets a value that indicates whether the document has a routing slip attached to it. | |
HasVBProject | Gets a value that indicates whether the document has an attached Microsoft Visual Basic for Applications (VBA) project. | |
HostContext | Infrastructure. | |
HTMLDivisions | Gets an HTMLDivisions object that represents an HTML division in a Web document. | |
HTMLProject | Infrastructure. | |
Hyperlinks | Gets a Hyperlinks collection that represents all the hyperlinks in the document. | |
HyphenateCaps | Gets or sets a value that indicates whether words in all capital letters can be hyphenated. | |
HyphenationZone | Gets or sets the width of the hyphenation zone, in points. | |
Indexes | Gets an Indexes collection that represents all the indexes in the document. | |
InlineShapes | Gets an InlineShapes collection that represents all the InlineShape objects in the document. | |
InnerObject | Gets a Microsoft.Office.Interop.Word.Document that represents the underlying native object for the document host item that this DocumentBase represents. | |
IsMasterDocument | Gets a value that indicates whether the document is a master document. | |
IsSubdocument | Gets a value that indicates whether the document is opened in a separate document window as a subdocument of a master document. | |
ItemProvider | Infrastructure. | |
JustificationMode | Gets or sets the character spacing adjustment for the document. | |
KerningByAlgorithm | Gets or sets a value that indicates whether Microsoft Office Word kerns half-width Latin characters and punctuation marks in the document. | |
Kind | Gets or sets the format type that Microsoft Office Word uses when automatically formatting the document. | |
LanguageDetected | Gets or sets a value that indicates whether Microsoft Office Word has detected the language of the text in the document. | |
ListParagraphs | Gets a ListParagraphs collection that represents all the numbered paragraphs in the document. | |
Lists | Gets a Lists collection that contains all the formatted lists in the document. | |
ListTemplates | Gets a ListTemplates collection that represents all the list formats for the document. | |
LockQuickStyleSet | Gets or sets a value that indicates whether users can change the set of Quick Styles that is being used. | |
LockTheme | Gets or sets a value that indicates whether users can change the document theme. | |
MailEnvelope | Gets an MsoEnvelope that represents an e-mail header for a document. | |
Mailer | Infrastructure. | |
MailMerge | Gets a MailMerge that represents the mail merge functionality for the document. | |
Name | Gets the name of the document. | |
NoLineBreakAfter | Gets or sets the kinsoku characters after which Microsoft Office Word will not break a line. | |
NoLineBreakBefore | Gets or sets the kinsoku characters before which Microsoft Office Word will not break a line. | |
OMathBreakBin | Gets or sets a value that specifies where Microsoft Office Word places binary operators when equations span two or more lines. | |
OMathBreakSub | Gets or sets a value that specifies how Microsoft Office Word handles a subtraction operator that falls before a line break. | |
OMathFontName | Gets or sets the name of the font that is used in a document to display equations. | |
OMathIntSubSupLim | Gets or sets a value that specifies the default location of limits for integrals. | |
OMathJc | Gets or sets a value that indicates the default justification—left, right, centered, or centered as a group—of a group of equations. | |
OMathLeftMargin | Gets or sets a value that specifies the left margin for equations. | |
OMathNarySupSubLim | Gets or sets a value that specifies the default location of limits for n-ary objects other than integrals. | |
OMathRightMargin | Gets or sets a value that represents the right margin for equations. | |
OMaths | Gets the collection of OMath objects in the document. | |
OMathSmallFrac | Gets or sets a value that indicates whether to use small fractions in equations contained within the document. | |
OMathWrap | Gets or sets a value that specifies the placement of the second line of an equation that wraps to a new line. | |
OpenEncoding | Gets the encoding used to open the document. | |
OptimizeForWord97 | Gets or sets a value that indicates whether Microsoft Office Word optimizes the document for viewing in Word 97 by disabling any incompatible formatting. | |
OriginalDocumentTitle | Gets the title of the original document after performing a legal-blackline document compare operation. | |
PageSetup | Gets or sets a PageSetup that is associated with the document. | |
Paragraphs | Gets a Paragraphs collection that represents all the paragraphs in the document. | |
Parent | Gets the parent object of the document. | |
Password | Sets a password that must be supplied to open the document. | |
PasswordEncryptionAlgorithm | Gets the algorithm Microsoft Office Word uses for encrypting documents with passwords. | |
PasswordEncryptionFileProperties | Gets a value that indicates whether Microsoft Office Word encrypts file properties for password-protected documents. | |
PasswordEncryptionKeyLength | Gets the key length of the algorithm Microsoft Office Word uses when encrypting documents with passwords. | |
PasswordEncryptionProvider | Gets the name of the algorithm encryption provider that Microsoft Office Word uses when encrypting documents with passwords. | |
Path | Gets the disk or Web path of the document. | |
Permission | Gets a Permission that represents the permission settings for the document. | |
PrintFormsData | Gets or sets a value that indicates whether Microsoft Office Word prints onto a preprinted form only the data entered in the corresponding online form. | |
PrintFractionalWidths | Gets or sets a value that indicates whether the document is formatted to use fractional point spacing to display and print characters. | |
PrintPostScriptOverText | Gets or sets a value that indicates whether PRINT field instructions (such as PostScript commands) in a document are to be printed on top of text and graphics when a PostScript printer is used. | |
PrintRevisions | Gets or sets a value that indicates whether revision marks are printed with the document. | |
ProtectionType | Gets the protection type for the document. | |
ReadabilityStatistics | Gets a ReadabilityStatistics collection that represents the readability statistics for the document. | |
ReadingLayoutSizeX | Gets or sets the width of pages in the document when it is displayed in reading layout view and is frozen for entering handwritten markup. | |
ReadingLayoutSizeY | Gets or sets the height of pages in the document when it is displayed in reading layout view and is frozen for entering handwritten markup. | |
ReadingModeLayoutFrozen | Gets or sets a value that indicates whether pages displayed in reading layout view are frozen to a specified size for inserting handwritten markup into a document. | |
ReadOnly | Gets a value that indicates whether changes to the document cannot be saved to the original document. | |
ReadOnlyRecommended | Gets or sets a value that indicates whether Microsoft Office Word displays a message whenever a user opens the document, suggesting that the document be opened as read-only. | |
RemoveDateAndTime | Gets or sets a value that indicates whether a document stores the date and time metadata for tracked changes. | |
RemovePersonalInformation | Gets or sets a value that indicates whether Microsoft Office Word removes all user information from comments, revisions, and the Properties dialog box when the user saves the document. | |
Research | Gets the research service for the document. | |
RevisedDocumentTitle | Gets the title of the revised document after performing a legal-blackline document compare operation. | |
Revisions | Gets a Revisions collection that represents the tracked changes in the document. | |
Routed | Gets a value that indicates whether the document has been routed to the next recipient. | |
RoutingSlip | Gets a RoutingSlip that represents the routing slip information for the document. | |
Saved | Gets or sets a value that indicates whether the document has not changed since it was last saved. | |
SaveEncoding | Gets or sets the encoding to use when saving the document. | |
SaveFormat | Gets the file format of the document. | |
SaveFormsData | Gets or sets a value that indicates whether Microsoft Office Word saves the data entered in a form as a tab-delimited record for use in a database. | |
SaveSubsetFonts | Gets or sets a value that indicates whether Microsoft Office Word saves a subset of the embedded TrueType fonts with the document. | |
Scripts | Gets a Scripts collection that represents the collection of HTML scripts in the document. | |
Sections | Gets a Sections collection that represents the sections in the document. | |
Sentences | Gets a Sentences collection that represents all the sentences in the document. | |
ServerPolicy | Gets the policy that is specified for the document, when the document is stored on a server that is running Microsoft Office SharePoint Server. | |
Shapes | Gets a Shapes collection that represents all the Shape objects in the document.s | |
SharedWorkspace | Gets a SharedWorkspace that represents the Document Workspace in which the document is located. | |
ShowGrammaticalErrors | Gets or sets a value that indicates whether grammatical errors are marked by a wavy green line in the document. | |
ShowRevisions | Gets or sets a value that indicates whether tracked changes in the document are shown on the screen. | |
ShowSpellingErrors | Gets or sets a value that indicates whether Microsoft Office Word underlines spelling errors in the document. | |
ShowSummary | Gets or sets a value that indicates whether an automatic summary is displayed for the document. | |
Signatures | Gets a SignatureSet that represents the digital signatures for the document. | |
Site | Infrastructure. | |
SmartDocument | Gets a SmartDocument that represents the settings for a smart document solution. | |
SmartTags | Gets a SmartTags object that represents a smart tag in a document. This type or member is intended to be used only in projects for the 2007 Microsoft Office system. Smart tags are deprecated in Office 2010. . |
|
SmartTagsAsXMLProps | Gets or sets a value that indicates whether Microsoft Office Word creates an XML header containing smart tag information when a document containing smart tags is saved as HTML. This type or member is intended to be used only in projects for the 2007 Microsoft Office system. Smart tags are deprecated in Office 2010. . |
|
SnapToGrid | Gets or sets a value that indicates whether AutoShapes or East Asian characters are automatically aligned with an invisible grid when they are drawn, moved, or resized in the document. | |
SnapToShapes | Gets or sets a value that indicates whether Microsoft Office Word automatically aligns AutoShapes or East Asian characters with invisible gridlines that go through the vertical and horizontal edges of other AutoShapes or East Asian characters in the document. | |
SpellingChecked | Gets or sets a value that indicates whether spelling has been checked throughout the document. | |
SpellingErrors | Gets a ProofreadingErrors collection that represents the words identified as spelling errors in the document. | |
StoryRanges | Gets a StoryRanges collection that represents all the stories in the document. | |
Styles | Gets a Styles collection for the document. | |
StyleSheets | Gets a StyleSheets object that represents the Web style sheets attached to the document. | |
StyleSortMethod | Gets or sets a value that specifies the sort method to use when sorting styles in the Styles task pane. | |
Subdocuments | Gets a Subdocuments collection that represents all the subdocuments in the document. | |
SummaryLength | Gets or sets the length of the summary as a percentage of the document length. | |
SummaryViewMode | Gets or sets the way a summary is displayed. | |
Sync | Gets a Sync object that provides access to the methods and properties of documents that are part of a Document Workspace. | |
Tables | Gets a Tables collection that represents all the tables in the document. | |
TablesOfAuthorities | Gets a TablesOfAuthorities collection that represents the tables of authorities in the document. | |
TablesOfAuthoritiesCategories | Gets a TablesOfAuthoritiesCategories collection that represents the available table of authorities categories for the document. | |
TablesOfContents | Gets a TablesOfContents collection that represents the tables of contents in the document. | |
TablesOfFigures | Gets a TablesOfFigures collection that represents the tables of figures in the document. | |
Tag | Gets or sets an object that contains data you want to save with the document. | |
TextEncoding | Gets or sets the code page, or character set, that Microsoft Office Word uses for a document saved as an encoded text file. | |
TextLineEnding | Gets or sets a WdLineEndingType constant indicating how Microsoft Office Word marks the line and paragraph breaks in documents saved as text files. | |
TrackFormatting | Gets or sets a value that indicates whether to track formatting changes when change tracking is turned on. | |
TrackMoves | Gets or sets a value that indicates whether to mark moved text when change tracking is turned on. | |
TrackRevisions | Gets or sets a value that indicates whether changes are tracked in the document. | |
Type | Gets the document type (template or document). | |
UpdateStylesOnOpen | Gets or sets a value that indicates whether the styles in the document are updated to match the styles in the attached template each time the document is opened. | |
UseMathDefaults | Gets or sets a value that indicates whether to use the default math settings when creating new equations. | |
UserControl | Gets or sets a value that indicates whether the document or application was created or opened by the user. | |
Variables | Gets a Variables collection that represents the variables stored in the document. | |
VBASigned | Gets a value that indicates whether the Visual Basic for Applications (VBA) project for the document has been digitally signed. | |
VBProject | Gets the Microsoft.Vbe.Interop.VBProject for the document. | |
Versions | Gets a Versions collection that represents all the versions of the document. | |
VstoSmartTags | Gets the Microsoft.Office.Tools.SmartTagCollection associated with the document. | |
WebOptions | Gets the WebOptions object, which contains document-level attributes used by Microsoft Office Word when you save a document as a Web page or open a Web page. | |
Windows | Gets a Windows collection that represents all windows for the document (for example, Sales.doc:1 and Sales.doc:2). | |
WordOpenXML | Gets an XML string that contains the contents of the document in the Word Open XML format. | |
Words | Gets a Microsoft.Office.Interop.Word.Words collection that represents all the words in the document. | |
WritePassword | Sets a password for saving changes to the document. | |
WriteReserved | Gets a value that indicates whether the document is protected with a write password. | |
XMLHideNamespaces | Gets a value that indicates whether to hide the XML namespaces in the list of elements in the XML Structure task pane. | |
XMLNodes | Gets a Microsoft.Office.Interop.Word.XMLNodes collection that represents the collection of all XML elements within the document. | |
XMLSaveDataOnly | Gets or sets a value that indicates whether Microsoft Office Word saves only the XML data or the entire document. | |
XMLSaveThroughXSLT | Gets or sets the path and file name for the Extensible Stylesheet Language Transformation (XSLT) to apply when a user saves the document. | |
XMLSchemaReferences | Gets an XMLSchemaReferences collection that represents the schemas attached to the document. | |
XMLSchemaViolations | Gets a Microsoft.Office.Interop.Word.XMLNodes collection that represents all nodes in the document that have validation errors. | |
XMLShowAdvancedErrors | Gets or sets a value that indicates whether error message text is generated from the built-in Microsoft Office Word error messages or from the Microsoft XML Core Services (MSXML) 5.0 component included with Office. | |
XMLUseXSLTWhenSaving | Gets or sets a value that indicates whether to save a document through an Extensible Stylesheet Language Transformation (XSLT). |
Top
Methods
Name | Description | |
---|---|---|
AcceptAllRevisions | Accepts all tracked changes in the document. | |
AcceptAllRevisionsShown | Accepts all revisions in the document that are displayed on the screen. | |
Activate | Gives focus to the document. | |
AddDocumentWorkspaceHeader | Infrastructure. | |
AddMeetingWorkspaceHeader | Infrastructure. | |
AddToFavorites | Creates a shortcut to the document and adds it to the Favorites folder. | |
ApplyDocumentTheme | Applies a document theme to a document. | |
ApplyQuickStyleSet | Changes the set of quick styles. | |
ApplyQuickStyleSet2 | Applies the specified quick style set to the document. | |
ApplyTheme | Applies a theme to a document, if the document is open. | |
AutoFormat | Automatically formats the document. Use the Kind property to specify a format type. | |
AutoSummarize | Creates an automatic summary of the document. | |
BeginInit | Infrastructure. | |
CanCheckin | Determines whether Microsoft Office Word can check in the document to a server. | |
CheckConsistency | Searches all text in a Japanese language document and displays instances where character usage is inconsistent for the same words. | |
CheckGrammar | Begins a spelling and grammar check for the document. | |
CheckIn | Puts a document on a server from a local computer, and sets the local document to read-only so that it cannot be edited locally. | |
CheckInWithVersion | Puts a document on a server from a local computer, and sets the local document to read-only so that it cannot be edited locally. | |
CheckNewSmartTags | Accesses the Microsoft Office Web site for available smart tag recognizer and action files. This type or member is intended to be used only in projects for the 2007 Microsoft Office system. Smart tags are deprecated in Office 2010. . |
|
CheckSpelling | Begins a spelling check for the document. | |
Close | Closes the document. | |
ClosePrintPreview | Switches the document from print preview to the previous view. If the document is not in print preview, an exception is thrown. | |
Compare | Displays revision marks that indicate where the document differs from another document. | |
Compare2000 | Infrastructure. | |
Compare2002 | Infrastructure. | |
ComputeStatistics | Gets a statistic based on the contents of the document. | |
Convert | Converts the document to the newest file format and enables all new features. | |
ConvertAutoHyphens | Converts hyphens created by automatic hyphenation to manual hyphens. | |
ConvertNumbersToText | Changes the list numbers and LISTNUM fields in the specified document to text. | |
ConvertVietDoc | Converts a Vietnamese document to Unicode using a code page other than the default. | |
CopyStylesFromTemplate | Copies styles from the specified template to a document. | |
CountNumberedItems | Returns the number of bulleted or numbered items and LISTNUM fields in the document. | |
CreateLetterContent | Creates and returns a LetterContent object based on the specified letter elements. | |
CreateRibbonExtensibilityObject | Returns an object that implements the Microsoft.Office.Core.IRibbonExtensibility interface. | |
CreateRibbonObjects | Returns an array of OfficeRibbon objects to the CreateRibbonExtensibilityObject method. | |
DataForm | Displays the Data Form dialog box, in which you can add, delete, or modify data records. | |
DeleteAllComments | Deletes all comments from the Comments collection in a document. | |
DeleteAllCommentsShown | Deletes all revisions in the document that are displayed on the screen. | |
DeleteAllEditableRanges | Deletes permissions in all ranges that the specified user or group of users has permission to modify. | |
DeleteAllInkAnnotations | Deletes all handwritten ink annotations in the document. | |
DetectLanguage | Analyzes the text in the document to determine the language that it is written in. | |
Dispose | Infrastructure. Releases the resources used by the DocumentBase. | |
DowngradeDocument | Changes a document to the Word 97-2003 document format so that it can be edited in a previous version of Microsoft Office Word. | |
EditionOptions | Infrastructure. | |
EndInit | Infrastructure. | |
EndReview | Terminates a review of a file that has been sent for review using the SendForReview method or that has been automatically placed in a review cycle by sending a document to another user in an e-mail message. | |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
ExportAsFixedFormat | Saves the document in PDF or XPS format. | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
FinishInitialization | Infrastructure. | |
FitToPages | Decreases the font size of text just enough so that the document will fit on one fewer pages. | |
FollowHyperlink | Resolves a hyperlink, or displays a cached document if the document has already been downloaded. | |
ForwardMailer | Infrastructure. | |
FreezeLayout | Fixes the layout of the document in Web view as it currently appears so that line breaks remain fixed and ink annotations do not move when you resize the window. | |
get_ActiveWritingStyle | Infrastructure. Use the ActiveWritingStyle property instead of this method. | |
get_Compatibility | Infrastructure. Use the Compatibility property instead of this method. | |
GetAutomationObject | Called by the Visual Studio Tools for Office runtime to get an object that can be used by VBA code in the document. | |
GetCrossReferenceItems | Gets an array of items that can be cross-referenced based on the specified cross-reference type. | |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetHostItem<T> | Infrastructure. | |
GetLetterContent | Retrieves letter elements from the document and returns a LetterContent. | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
GetWorkflowTasks | Returns the workflow tasks that are assigned to the document. | |
GetWorkflowTemplates | Returns the workflow templates that are attached to the document. | |
GoTo | Returns a Microsoft.Office.Interop.Word.Range that represents the start position of the specified item, such as a page, bookmark, or field. | |
Initialize | Infrastructure. | |
InitializeDataBindings | Infrastructure. | |
LockServerFile | Locks the document on the server, which prevents anyone else from editing it. | |
MakeCompatibilityDefault | Sets the compatibility options on the Compatibility tab in the Options dialog box as the default settings for new documents. | |
ManualHyphenation | Initiates manual hyphenation of a document, one line at a time. The user is prompted to accept or decline suggested hyphenations. | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
Merge | Merges the changes marked with revision marks from one document to another. | |
Merge2000 | Infrastructure. | |
OnShutdown | Infrastructure. | |
OnStartup | Infrastructure. | |
Post | Posts the document to a public folder in Microsoft Exchange. This method displays the Send to Exchange Folder dialog box so that a folder can be selected. | |
PresentIt | Opens Microsoft Office PowerPoint with the document loaded. | |
PrintOut | Prints all or part of the document. | |
PrintOut2000 | Infrastructure. | |
PrintOutOld | Infrastructure. | |
PrintPreview | Switches the view to print preview. | |
Protect | Applies one of several types of protection to the document. | |
Protect2002 | Infrastructure. | |
ProtectDocument | Provides you with an opportunity to reapply password protection to the document after the cached data has been saved. | |
Range | Returns a Microsoft.Office.Interop.Word.Range by using the specified starting and ending character positions. | |
RecheckSmartTags | Removes smart tags recognized by the grammar checker and rechecks the document content against all smart tag recognizers. | |
Redo | Performs the last action that was undone (reverses the Undo method). | |
RejectAllRevisions | Rejects all tracked changes in the document. | |
RejectAllRevisionsShown | Rejects all revisions in the document that are displayed on the screen. | |
Reload | Reloads a cached document by resolving the hyperlink to the document and downloading the document. | |
ReloadAs | Reloads a document based on an HTML document, using the specified document encoding. | |
RemoveCustomization | Removes the customization from the document. | |
RemoveDocumentInformation | Removes metadata, such as properties and comments, from a document. | |
RemoveDocumentWorkspaceHeader | Infrastructure. | |
RemoveLockedStyles | Purges a document of locked styles when formatting restrictions have been applied in a document. | |
RemoveNumbers | Removes numbers or bullets from the document. | |
RemoveSmartTags | Removes all smart tag information from the document. This type or member is intended to be used only in projects for the 2007 Microsoft Office system. Smart tags are deprecated in Office 2010. . |
|
RemoveTheme | Removes the active theme from the document. | |
Repaginate | Repaginates the entire document. | |
Reply | Opens a new e-mail message for replying to the active message. The sender's address is included on the To: line. | |
ReplyAll | Opens a new e-mail message for replying to the active message. The sender’s address and all other recipients' addresses are included on the To: and Cc: lines as appropriate. | |
ReplyWithChanges | Sends an e-mail message to the author of a document that has been sent out for review, notifying him or her that a reviewer has completed review of the document. | |
RequestService | Returns an object that implements the Microsoft.Office.Core.IRibbonExtensibility interface in a document-level customization. | |
ResetFormFields | Clears all form fields in a document, preparing the form to be filled in again. | |
Route | Routes the document, using the document's current routing slip. | |
RunAutoMacro | Runs an auto macro that is stored in the document. | |
RunLetterWizard | Runs the Letter Wizard on the document. | |
Save | Saves the document. If the document has not been saved before, the Save As dialog box prompts the user for a file name. | |
SaveAs | Saves the document with a new name or format. Some of the arguments for this method correspond to the options in the Save As dialog box. | |
SaveAs2 | Saves the document with a new name or format. Some of the arguments for this method correspond to the options in the Save As dialog box. | |
SaveAs2000 | Infrastructure. | |
SaveAsQuickStyleSet | Saves the group of quick styles currently in use. | |
sblt | Infrastructure. | |
Select | Selects the document. | |
SelectAllEditableRanges | Selects all ranges that the specified user or group of users has permission to modify. | |
SelectContentControlsByTag | Returns all the content controls in the document that have the specified tag. | |
SelectContentControlsByTitle | Returns all the content controls in the document that have the specified title. | |
SelectLinkedControls | Returns all the content controls in the document that are linked to the specified custom XML node. | |
SelectNodes | Gets a Microsoft.Office.Interop.Word.XMLNodes collection that represents all the nodes that match the XPath parameter in the order in which they appear in the document. | |
SelectSingleNode | Returns a Microsoft.Office.Interop.Word.XMLNode object that represents the first node in the document that matches the XPath parameter. | |
SelectUnlinkedControls | Returns all the content controls in the document that are not linked to a custom XML part. | |
SendFax | Sends the document as a fax, without any user interaction. | |
SendFaxOverInternet | Sends the document to a fax service provider, who faxes the document to one or more specified recipients. | |
SendForReview | Sends the document in an e-mail message for review by the specified recipients. | |
SendMail | Opens a message window for sending the document through Microsoft Exchange. | |
SendMailer | Infrastructure. | |
set_ActiveWritingStyle | Infrastructure. | |
set_Compatibility | Infrastructure. | |
SetCompatibilityMode | Sets the compatibility mode for the document. | |
SetDefaultTableStyle | Specifies the table style to use for newly created tables in the document. | |
SetLetterContent | ||
SetPasswordEncryptionOptions | Sets the options Microsoft Office Word uses for encrypting documents with passwords. | |
ToggleFormsDesign | Switches form design mode on or off. | |
ToString | Returns a string that represents the current object. (Inherited from Object.) | |
TransformDocument | Applies the specified Extensible Stylesheet Language Transformation (XSLT) file to the document and replaces the document with the results. | |
Undo | Undoes the last action or a sequence of actions, which are displayed in the Undo list. Returns true if the actions were successfully undone. | |
UndoClear | Clears the list of actions that can be undone for the document. Corresponds to the list of items that appears when you click the arrow beside the Undo button on the Standard toolbar. | |
UnfreezeLayout | Reverses the effect of FreezeLayout, and enables line breaks to change and ink annotations to move when you resize the Web browser window. | |
Unprotect | Removes protection from the document. | |
UnprotectDocument | Provides you with an opportunity to remove password protection from the document and enable cached data to be saved. | |
UpdateStyles | Copies all styles from the attached template into the document, overwriting any existing styles in the document that have the same name. | |
UpdateSummaryProperties | Updates the keyword and comment text in the Properties dialog box to reflect the AutoSummary content for the document. | |
ViewCode | Displays the code window for the selected ActiveX control in the document. | |
ViewPropertyBrowser | Displays the property window for the selected ActiveX control in the specified document. | |
WebPagePreview |
Top
Events
Name | Description | |
---|---|---|
ActivateEvent | Occurs when the document becomes the active window. | |
BeforeClose | Occurs immediately before the document closes. | |
BeforeDoubleClick | Occurs when the editing area of the document window is double-clicked, before the default double-click action. | |
BeforePrint | Occurs before the document is printed. | |
BeforeRightClick | Occurs when the editing area of the document window is right-clicked, before the default right-click action. | |
BeforeSave | Occurs before the document is saved. | |
BindingContextChanged | Infrastructure. | |
BuildingBlockInsert | Occurs when a building block is inserted into a document. | |
CloseEvent | Occurs when the document is closed. | |
ContentControlAfterAdd | Occurs after a content control is added to a document. | |
ContentControlBeforeContentUpdate | Occurs just before Microsoft Office Word updates the text in a content control, if the content control is bound to a custom XML part. | |
ContentControlBeforeDelete | Occurs just before a content control is deleted from the document. | |
ContentControlBeforeStoreUpdate | Occurs just before Microsoft Office Word updates data in a custom XML part that is bound to the content control (that is, after the text in the content control changes). | |
ContentControlOnEnter | Occurs when the user clicks in a content control, or when the cursor is moved into a content control programmatically. | |
ContentControlOnExit | Occurs when the user clicks outside a content control, or when the cursor is moved outside a content control programmatically. | |
Deactivate | Occurs when the active document window loses focus. | |
Disposed | Infrastructure. | |
MailMergeAfterMerge | Occurs after all records in a mail merge have merged successfully. | |
MailMergeAfterRecordMerge | Occurs after each record in the data source successfully merges in a mail merge. | |
MailMergeBeforeMerge | Occurs when a merge is executed, before any records merge. | |
MailMergeBeforeRecordMerge | Occurs as a merge is executed for the individual records in a merge. | |
MailMergeDataSourceLoad | Occurs when the data source is loaded for a mail merge. | |
MailMergeWizardSendToCustom | Occurs when the custom button is clicked on step six of the Mail Merge Wizard. | |
MailMergeWizardStateChange | Occurs when a user changes from a specified step to a specified step in the Mail Merge Wizard. | |
New | Occurs when a new document is created. | |
Open | Occurs when the document is opened. | |
SelectionChange | Occurs when the selection changes in the document window. | |
Shutdown | Occurs when the document host item shuts down. | |
Startup | Occurs after the document is running and all the initialization code in the assembly has been run. | |
SyncEvent | Occurs when the local copy of a document that is part of a Document Workspace is synchronized with the copy on the server. | |
WindowSize | Occurs when the document window is resized or moved. | |
XMLAfterInsert | Occurs when a user adds a new XML element to a document. If more than one element is added to the document at the same time (for example, when cutting and pasting XML), the event is raised for each element that is inserted. | |
XMLBeforeDelete | Occurs when a user deletes an XML element from a document. If more than one element is deleted from the document at the same time (for example, when cutting and pasting XML), the event is raised for each element that is deleted. |
Top
Explicit Interface Implementations
Name | Description | |
---|---|---|
EntryPoint.BeginInit | Infrastructure. | |
EntryPoint.EndInit | Infrastructure. | |
EntryPoint.FinishInitialization | Infrastructure. | |
EntryPoint.Initialize | Infrastructure. | |
EntryPoint.InitializeDataBindings | Infrastructure. | |
EntryPoint.OnShutdown | Infrastructure. | |
EntryPoint.OnStartup | Infrastructure. | |
ICachedDataPersistanceCallback.OnAfterSave | ||
ICachedDataPersistanceCallback.OnBeforeSave | ||
IDocumentExtension.CreateRibbonExtensibilityObject | Infrastructure. | |
IDocumentExtension.CreateRibbonObjects | Infrastructure. | |
IDocumentExtension.GetAutomationObject | Infrastructure. | |
IDocumentExtension.ProtectDocument | Infrastructure. | |
IDocumentExtension.RequestService | Infrastructure. | |
IDocumentExtension.UnprotectDocument | Infrastructure. | |
IExtension.ExtensionBase | Infrastructure. |
Top
Remarks
The DocumentBase class is the base class for the ThisDocument class in document-level Word projects created by using Visual Studio. Use the ThisDocument class to access the document in your project. For more information, see Programming Document-Level Customizations.
The DocumentBase class provides the same members as a Microsoft.Office.Interop.Word.Document object in the Word primary interop assembly, but it adds the following features:
Controls property. Use this property to add managed controls to the document in your project, or to remove managed controls.
VstoSmartTags property. Use this property to add smart tags to the document in your project.
InnerObject property. Use this property to get the underlying Microsoft.Office.Interop.Word.Document object for the document host item.
RemoveCustomization method. Use this method to remove the customization assembly from the document in your project.
CreateRibbonObjects method. Override this method if you added multiple custom Ribbons to your project by using the Ribbon (Visual Designer) item template, and you want to specify which Ribbons to display at run time.
GetAutomationObject method. Override this method to expose a class in your project to VBA code in the document.
Document-level events, such as BeforeClose and BeforeSave, that are provided only at the application level in the Word object model. That is, in the Word object model, these events are defined in the Microsoft.Office.Interop.Word.Application class rather than the Microsoft.Office.Interop.Word.Document class.
Creating Document Host Items
You cannot create DocumentBase objects programmatically in Office projects.
In document-level projects, the ThisDocument class (which derives from DocumentBase) is instantiated automatically by the Visual Studio Tools for Office runtime when the end user opens the document. For more information, see Programming Document-Level Customizations.
In application-level projects, you can create Microsoft.Office.Tools.Word.Document host items programmatically by using the GetVstoObject method. For more information, see Extending Word Documents and Excel Workbooks in Application-Level Add-ins at Run Time.
Usage
This type is used only in Office projects that target the .NET Framework 4 and the .NET Framework 4.5. The assembly that defines this type is not part of the Visual Studio Tools for Office runtime. You must deploy this assembly with your solution. For more information, see Assemblies in the Visual Studio Tools for Office Runtime.
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
Reference
Microsoft.Office.Tools.Word Namespace