DocumentBase Class

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Provides the base class for the ThisDocument class in document-level projects for Microsoft Office Word.

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)

public abstract class DocumentBase : IDocumentExtension, 
	IExtension, EntryPoint, ISupportInitialize, IBindableComponent, IComponent, 
	IDisposable, ICachedDataPersistanceCallback

The DocumentBase type exposes the following members.

  NameDescription
Protected methodDocumentBaseInfrastructure.
Top

  NameDescription
Public property_CodeNameInfrastructure.
Public propertyActiveThemeGets the name of the active theme plus the theme formatting options for the document.
Public propertyActiveThemeDisplayNameGets the display name of the active theme for the document.
Public propertyActiveWindowGets a Window that represents the active window.
Public propertyActiveWritingStyle
Public propertyApplicationGets an Application that represents the creator of the document.
Public propertyAttachedTemplateGets or sets a Template that represents the template attached to the document.
Public propertyAutoFormatOverrideGets or sets a value that indicates whether automatic formatting options override formatting restrictions in a document where formatting restrictions are in effect.
Public propertyAutoHyphenationGets or sets a value that indicates whether automatic hyphenation is turned on for the specified document.
Public propertyBackgroundGets or sets a Shape that represents the background image for the specified document.
Public propertyBaseGets the Document object that this DocumentBase object extends.
Public propertyBibliographyGets the bibliography references contained within the document.
Public propertyBindingContextInfrastructure.
Public propertyBookmarksGets a Microsoft.Office.Interop.Word.Bookmarks collection that represents all the bookmarks in the document.
Public propertyBuiltInDocumentPropertiesGets a DocumentProperties collection that represents all the built-in document properties for the document.
Public propertyCharactersGets a Characters collection that represents the characters in the document.
Public propertyChildNodeSuggestionsGets 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).
Public propertyClickAndTypeParagraphStyleGets or sets the default paragraph style applied to text by the Click and Type feature in the document.
Public propertyCoAuthoringRepresents co-authoring-related functionality in the document.
Public propertyCodeNameInfrastructure.
Public propertyCommandBarsGets a CommandBars collection that represents the menu bar and all the toolbars in Microsoft Office Word.
Public propertyCommentsGets a Comments collection that represents all the comments in the document.
Public propertyCompatibilityGets a value that indicates whether the specified compatibility option is enabled.
Public propertyCompatibilityModeGets a value that specifies the compatibility mode that Word uses when opening the document.
Public propertyConsecutiveHyphensLimitGets or sets the maximum number of consecutive lines that can end with hyphens.
Public propertyContainerGets the container application for the document.
Public propertyContentGets a Range that represents the main document story.
Public propertyContentControlsGets the collection of all the content controls in the document.
Public propertyContentTypePropertiesGets the metadata that is stored in a document, such as author name, subject, and company.
Public propertyControlsGets the collection of managed controls that are contained on the document.
Public propertyCreatorGets the application in which the document was created.
Public propertyCurrentRsidGets a random number that Microsoft Office Word assigns to changes in the document.
Public propertyCustomDocumentPropertiesGets a DocumentProperties collection that represents all the custom document properties for the document.
Public propertyCustomXMLPartsReturns the custom XML parts in the document.
Public propertyDataBindingsInfrastructure.
Public propertyDataHostInfrastructure.
Public propertyDefaultTableStyleGets the table style that is applied to all newly created tables in the document.
Public propertyDefaultTabStopGets or sets the interval (in points) between the default tab stops in the document.
Public propertyDefaultTargetFrameGets or sets the browser frame in which to display a Web page reached through a hyperlink.
Public propertyDisableFeaturesGets or sets a value that indicates whether all features introduced after the version specified in the DisableFeaturesIntroducedAfter property are disabled.
Public propertyDisableFeaturesIntroducedAfterGets or sets a value that determines whether all features introduced after a specified version of Microsoft Office Word are disabled in the document only.
Public propertyDocIDInfrastructure.
Public propertyDocumentInspectorsGets a Microsoft.Office.Core.DocumentInspectors object that you can use to locate hidden personal information, such as author name, company name, and revision date.
Public propertyDocumentLibraryVersionsGets 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.
Public propertyDocumentThemeGets the Microsoft Office theme that is applied to the document.
Public propertyDoNotEmbedSystemFontsGets or sets a value that indicates whether Microsoft Office Word embeds common system fonts.
Public propertyEmailGets an Email object that contains all the e-mail–related properties of the document.
Public propertyEmbedLinguisticDataGets 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.
Public propertyEmbedSmartTagsGets 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.
.
Public propertyEmbedTrueTypeFontsGets or sets a value that indicates whether Microsoft Office Word embeds TrueType fonts in a document when the document is saved.
Public propertyEncryptionProviderGets or sets the name of the algorithm encryption provider that Microsoft Office Word uses when encrypting documents.
Public propertyEndnotesGets an Endnotes collection that represents all the endnotes in the document.
Public propertyEnforceStyleGets or sets a value that indicates whether formatting restrictions are enforced in a protected document.
Public propertyEnvelopeGets an Envelope that represents envelope functionality and the envelope in the document.
Public propertyFarEastLineBreakLanguageGets or sets the East Asian language to use when breaking lines of text in the document.
Public propertyFarEastLineBreakLevelGets or sets the line break control level for the specified document.
Public propertyFieldsGets a read-only Fields collection that contains the fields in the main text story.
Public propertyFinalGets or sets a value that indicates whether the document is final.
Public propertyFootnotesGets a Footnotes collection that represents all the footnotes in the document.
Public propertyFormattingShowClearGets or sets a value that indicates whether Microsoft Office Word shows Clear Formatting in the Styles and Formatting task pane.
Public propertyFormattingShowFilterGets or sets a WdShowFilter constant that represents the styles and formatting displayed in the Styles and Formatting task pane.
Public propertyFormattingShowFontGets or sets a value that indicates whether Microsoft Office Word displays font formatting in the Styles and Formatting task pane.
Public propertyFormattingShowNextLevelGets or sets a value that indicates whether Microsoft Office Word shows the next heading level when the previous heading level is used.
Public propertyFormattingShowNumberingGets or sets a value that indicates whether Microsoft Office Word displays number formatting in the Styles and Formatting task pane.
Public propertyFormattingShowParagraphGets or sets a value that indicates whether Microsoft Office Word displays paragraph formatting in the Styles and Formatting task pane.
Public propertyFormattingShowUserStyleNameGets or sets a value that indicates whether to show user-defined styles.
Public propertyFormFieldsGets a FormFields collection that represents all the form fields in the document.
Public propertyFormsDesignGets a value that indicates whether the document is in form design mode.
Public propertyFramesGets a Frames collection that represents all the frames in the document.
Public propertyFramesetGets a Frameset that represents an entire frames page or a single frame on a frames page.
Public propertyFullNameGets the name of the document, including the drive or Web path.
Public propertyGrammarCheckedGets or sets a value that indicates whether a grammar check has been run on the document.
Public propertyGrammaticalErrorsGets a ProofreadingErrors collection that represents the sentences that failed the grammar check on the document.
Public propertyGridDistanceHorizontalGets 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.
Public propertyGridDistanceVerticalGets 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.
Public propertyGridOriginFromMarginGets or sets a value that indicates whether Microsoft Office Word starts the character grid from the upper-left corner of the page.
Public propertyGridOriginHorizontalGets 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.
Public propertyGridOriginVerticalGets 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.
Public propertyGridSpaceBetweenHorizontalLinesGets or sets the interval at which Microsoft Office Word displays horizontal character gridlines in print layout view.
Public propertyGridSpaceBetweenVerticalLinesGets or sets the interval at which Microsoft Office Word displays vertical character gridlines in print layout view.
Public propertyHasMailerInfrastructure.
Public propertyHasPasswordGets a value that indicates whether a password is required to open the document.
Public propertyHasRoutingSlipGets or sets a value that indicates whether the document has a routing slip attached to it.
Public propertyHasVBProjectGets a value that indicates whether the document has an attached Microsoft Visual Basic for Applications (VBA) project.
Public propertyHostContextInfrastructure.
Public propertyHTMLDivisionsGets an HTMLDivisions object that represents an HTML division in a Web document.
Public propertyHTMLProjectInfrastructure.
Public propertyHyperlinksGets a Hyperlinks collection that represents all the hyperlinks in the document.
Public propertyHyphenateCapsGets or sets a value that indicates whether words in all capital letters can be hyphenated.
Public propertyHyphenationZoneGets or sets the width of the hyphenation zone, in points.
Public propertyIndexesGets an Indexes collection that represents all the indexes in the document.
Public propertyInlineShapesGets an InlineShapes collection that represents all the InlineShape objects in the document.
Public propertyInnerObjectGets a Microsoft.Office.Interop.Word.Document that represents the underlying native object for the document host item that this DocumentBase represents.
Public propertyIsMasterDocumentGets a value that indicates whether the document is a master document.
Public propertyIsSubdocumentGets a value that indicates whether the document is opened in a separate document window as a subdocument of a master document.
Public propertyItemProviderInfrastructure.
Public propertyJustificationModeGets or sets the character spacing adjustment for the document.
Public propertyKerningByAlgorithmGets or sets a value that indicates whether Microsoft Office Word kerns half-width Latin characters and punctuation marks in the document.
Public propertyKindGets or sets the format type that Microsoft Office Word uses when automatically formatting the document.
Public propertyLanguageDetectedGets or sets a value that indicates whether Microsoft Office Word has detected the language of the text in the document.
Public propertyListParagraphsGets a ListParagraphs collection that represents all the numbered paragraphs in the document.
Public propertyListsGets a Lists collection that contains all the formatted lists in the document.
Public propertyListTemplatesGets a ListTemplates collection that represents all the list formats for the document.
Public propertyLockQuickStyleSetGets or sets a value that indicates whether users can change the set of Quick Styles that is being used.
Public propertyLockThemeGets or sets a value that indicates whether users can change the document theme.
Public propertyMailEnvelopeGets an MsoEnvelope that represents an e-mail header for a document.
Public propertyMailerInfrastructure.
Public propertyMailMergeGets a MailMerge that represents the mail merge functionality for the document.
Public propertyNameGets the name of the document.
Public propertyNoLineBreakAfterGets or sets the kinsoku characters after which Microsoft Office Word will not break a line.
Public propertyNoLineBreakBeforeGets or sets the kinsoku characters before which Microsoft Office Word will not break a line.
Public propertyOMathBreakBinGets or sets a value that specifies where Microsoft Office Word places binary operators when equations span two or more lines.
Public propertyOMathBreakSubGets or sets a value that specifies how Microsoft Office Word handles a subtraction operator that falls before a line break.
Public propertyOMathFontNameGets or sets the name of the font that is used in a document to display equations.
Public propertyOMathIntSubSupLimGets or sets a value that specifies the default location of limits for integrals.
Public propertyOMathJcGets or sets a value that indicates the default justification—left, right, centered, or centered as a group—of a group of equations.
Public propertyOMathLeftMarginGets or sets a value that specifies the left margin for equations.
Public propertyOMathNarySupSubLimGets or sets a value that specifies the default location of limits for n-ary objects other than integrals.
Public propertyOMathRightMarginGets or sets a value that represents the right margin for equations.
Public propertyOMathsGets the collection of OMath objects in the document.
Public propertyOMathSmallFracGets or sets a value that indicates whether to use small fractions in equations contained within the document.
Public propertyOMathWrapGets or sets a value that specifies the placement of the second line of an equation that wraps to a new line.
Public propertyOpenEncodingGets the encoding used to open the document.
Public propertyOptimizeForWord97Gets or sets a value that indicates whether Microsoft Office Word optimizes the document for viewing in Word 97 by disabling any incompatible formatting.
Public propertyOriginalDocumentTitleGets the title of the original document after performing a legal-blackline document compare operation.
Public propertyPageSetupGets or sets a PageSetup that is associated with the document.
Public propertyParagraphsGets a Paragraphs collection that represents all the paragraphs in the document.
Public propertyParentGets the parent object of the document.
Public propertyPasswordSets a password that must be supplied to open the document.
Public propertyPasswordEncryptionAlgorithmGets the algorithm Microsoft Office Word uses for encrypting documents with passwords.
Public propertyPasswordEncryptionFilePropertiesGets a value that indicates whether Microsoft Office Word encrypts file properties for password-protected documents.
Public propertyPasswordEncryptionKeyLengthGets the key length of the algorithm Microsoft Office Word uses when encrypting documents with passwords.
Public propertyPasswordEncryptionProviderGets the name of the algorithm encryption provider that Microsoft Office Word uses when encrypting documents with passwords.
Public propertyPathGets the disk or Web path of the document.
Public propertyPermissionGets a Permission that represents the permission settings for the document.
Public propertyPrintFormsDataGets or sets a value that indicates whether Microsoft Office Word prints onto a preprinted form only the data entered in the corresponding online form.
Public propertyPrintFractionalWidthsGets or sets a value that indicates whether the document is formatted to use fractional point spacing to display and print characters.
Public propertyPrintPostScriptOverTextGets 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.
Public propertyPrintRevisionsGets or sets a value that indicates whether revision marks are printed with the document.
Public propertyProtectionTypeGets the protection type for the document.
Public propertyReadabilityStatisticsGets a ReadabilityStatistics collection that represents the readability statistics for the document.
Public propertyReadingLayoutSizeXGets or sets the width of pages in the document when it is displayed in reading layout view and is frozen for entering handwritten markup.
Public propertyReadingLayoutSizeYGets or sets the height of pages in the document when it is displayed in reading layout view and is frozen for entering handwritten markup.
Public propertyReadingModeLayoutFrozenGets 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.
Public propertyReadOnlyGets a value that indicates whether changes to the document cannot be saved to the original document.
Public propertyReadOnlyRecommendedGets 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.
Public propertyRemoveDateAndTimeGets or sets a value that indicates whether a document stores the date and time metadata for tracked changes.
Public propertyRemovePersonalInformationGets 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.
Public propertyResearchGets the research service for the document.
Public propertyRevisedDocumentTitleGets the title of the revised document after performing a legal-blackline document compare operation.
Public propertyRevisionsGets a Revisions collection that represents the tracked changes in the document.
Public propertyRoutedGets a value that indicates whether the document has been routed to the next recipient.
Public propertyRoutingSlipGets a RoutingSlip that represents the routing slip information for the document.
Public propertySavedGets or sets a value that indicates whether the document has not changed since it was last saved.
Public propertySaveEncodingGets or sets the encoding to use when saving the document.
Public propertySaveFormatGets the file format of the document.
Public propertySaveFormsDataGets 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.
Public propertySaveSubsetFontsGets or sets a value that indicates whether Microsoft Office Word saves a subset of the embedded TrueType fonts with the document.
Public propertyScriptsGets a Scripts collection that represents the collection of HTML scripts in the document.
Public propertySectionsGets a Sections collection that represents the sections in the document.
Public propertySentencesGets a Sentences collection that represents all the sentences in the document.
Public propertyServerPolicyGets the policy that is specified for the document, when the document is stored on a server that is running Microsoft Office SharePoint Server.
Public propertyShapesGets a Shapes collection that represents all the Shape objects in the document.s
Public propertySharedWorkspaceGets a SharedWorkspace that represents the Document Workspace in which the document is located.
Public propertyShowGrammaticalErrorsGets or sets a value that indicates whether grammatical errors are marked by a wavy green line in the document.
Public propertyShowRevisionsGets or sets a value that indicates whether tracked changes in the document are shown on the screen.
Public propertyShowSpellingErrorsGets or sets a value that indicates whether Microsoft Office Word underlines spelling errors in the document.
Public propertyShowSummaryGets or sets a value that indicates whether an automatic summary is displayed for the document.
Public propertySignaturesGets a SignatureSet that represents the digital signatures for the document.
Public propertySiteInfrastructure.
Public propertySmartDocumentGets a SmartDocument that represents the settings for a smart document solution.
Public propertySmartTagsGets 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.
.
Public propertySmartTagsAsXMLPropsGets 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.
.
Public propertySnapToGridGets 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.
Public propertySnapToShapesGets 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.
Public propertySpellingCheckedGets or sets a value that indicates whether spelling has been checked throughout the document.
Public propertySpellingErrorsGets a ProofreadingErrors collection that represents the words identified as spelling errors in the document.
Public propertyStoryRangesGets a StoryRanges collection that represents all the stories in the document.
Public propertyStylesGets a Styles collection for the document.
Public propertyStyleSheetsGets a StyleSheets object that represents the Web style sheets attached to the document.
Public propertyStyleSortMethodGets or sets a value that specifies the sort method to use when sorting styles in the Styles task pane.
Public propertySubdocumentsGets a Subdocuments collection that represents all the subdocuments in the document.
Public propertySummaryLengthGets or sets the length of the summary as a percentage of the document length.
Public propertySummaryViewModeGets or sets the way a summary is displayed.
Public propertySyncGets a Sync object that provides access to the methods and properties of documents that are part of a Document Workspace.
Public propertyTablesGets a Tables collection that represents all the tables in the document.
Public propertyTablesOfAuthoritiesGets a TablesOfAuthorities collection that represents the tables of authorities in the document.
Public propertyTablesOfAuthoritiesCategoriesGets a TablesOfAuthoritiesCategories collection that represents the available table of authorities categories for the document.
Public propertyTablesOfContentsGets a TablesOfContents collection that represents the tables of contents in the document.
Public propertyTablesOfFiguresGets a TablesOfFigures collection that represents the tables of figures in the document.
Public propertyTagGets or sets an object that contains data you want to save with the document.
Public propertyTextEncodingGets or sets the code page, or character set, that Microsoft Office Word uses for a document saved as an encoded text file.
Public propertyTextLineEndingGets or sets a WdLineEndingType constant indicating how Microsoft Office Word marks the line and paragraph breaks in documents saved as text files.
Public propertyTrackFormattingGets or sets a value that indicates whether to track formatting changes when change tracking is turned on.
Public propertyTrackMovesGets or sets a value that indicates whether to mark moved text when change tracking is turned on.
Public propertyTrackRevisionsGets or sets a value that indicates whether changes are tracked in the document.
Public propertyTypeGets the document type (template or document).
Public propertyUpdateStylesOnOpenGets 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.
Public propertyUseMathDefaultsGets or sets a value that indicates whether to use the default math settings when creating new equations.
Public propertyUserControlGets or sets a value that indicates whether the document or application was created or opened by the user.
Public propertyVariablesGets a Variables collection that represents the variables stored in the document.
Public propertyVBASignedGets a value that indicates whether the Visual Basic for Applications (VBA) project for the document has been digitally signed.
Public propertyVBProjectGets the Microsoft.Vbe.Interop.VBProject for the document.
Public propertyVersionsGets a Versions collection that represents all the versions of the document.
Public propertyVstoSmartTagsGets the Microsoft.Office.Tools.SmartTagCollection associated with the document.
Public propertyWebOptionsGets 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.
Public propertyWindowsGets a Windows collection that represents all windows for the document (for example, Sales.doc:1 and Sales.doc:2).
Public propertyWordOpenXMLGets an XML string that contains the contents of the document in the Word Open XML format.
Public propertyWordsGets a Microsoft.Office.Interop.Word.Words collection that represents all the words in the document.
Public propertyWritePasswordSets a password for saving changes to the document.
Public propertyWriteReservedGets a value that indicates whether the document is protected with a write password.
Public propertyXMLHideNamespacesGets a value that indicates whether to hide the XML namespaces in the list of elements in the XML Structure task pane.
Public propertyXMLNodesGets a Microsoft.Office.Interop.Word.XMLNodes collection that represents the collection of all XML elements within the document.
Public propertyXMLSaveDataOnlyGets or sets a value that indicates whether Microsoft Office Word saves only the XML data or the entire document.
Public propertyXMLSaveThroughXSLTGets or sets the path and file name for the Extensible Stylesheet Language Transformation (XSLT) to apply when a user saves the document.
Public propertyXMLSchemaReferencesGets an XMLSchemaReferences collection that represents the schemas attached to the document.
Public propertyXMLSchemaViolationsGets a Microsoft.Office.Interop.Word.XMLNodes collection that represents all nodes in the document that have validation errors.
Public propertyXMLShowAdvancedErrorsGets 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.
Public propertyXMLUseXSLTWhenSavingGets or sets a value that indicates whether to save a document through an Extensible Stylesheet Language Transformation (XSLT).
Top

  NameDescription
Public methodAcceptAllRevisionsAccepts all tracked changes in the document.
Public methodAcceptAllRevisionsShownAccepts all revisions in the document that are displayed on the screen.
Public methodActivateGives focus to the document.
Public methodAddDocumentWorkspaceHeaderInfrastructure.
Public methodAddMeetingWorkspaceHeaderInfrastructure.
Public methodAddToFavoritesCreates a shortcut to the document and adds it to the Favorites folder.
Public methodApplyDocumentThemeApplies a document theme to a document.
Public methodApplyQuickStyleSetChanges the set of quick styles.
Public methodApplyQuickStyleSet2Applies the specified quick style set to the document.
Public methodApplyThemeApplies a theme to a document, if the document is open.
Public methodAutoFormatAutomatically formats the document. Use the Kind property to specify a format type.
Public methodAutoSummarizeCreates an automatic summary of the document.
Public methodBeginInitInfrastructure.
Public methodCanCheckinDetermines whether Microsoft Office Word can check in the document to a server.
Public methodCheckConsistencySearches all text in a Japanese language document and displays instances where character usage is inconsistent for the same words.
Public methodCheckGrammarBegins a spelling and grammar check for the document.
Public methodCheckInPuts a document on a server from a local computer, and sets the local document to read-only so that it cannot be edited locally.
Public methodCheckInWithVersionPuts a document on a server from a local computer, and sets the local document to read-only so that it cannot be edited locally.
Public methodCheckNewSmartTagsAccesses 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.
.
Public methodCheckSpellingBegins a spelling check for the document.
Public methodCloseCloses the document.
Public methodClosePrintPreviewSwitches the document from print preview to the previous view. If the document is not in print preview, an exception is thrown.
Public methodCompareDisplays revision marks that indicate where the document differs from another document.
Public methodCompare2000Infrastructure.
Public methodCompare2002Infrastructure.
Public methodComputeStatisticsGets a statistic based on the contents of the document.
Public methodConvertConverts the document to the newest file format and enables all new features.
Public methodConvertAutoHyphensConverts hyphens created by automatic hyphenation to manual hyphens.
Public methodConvertNumbersToTextChanges the list numbers and LISTNUM fields in the specified document to text.
Public methodConvertVietDocConverts a Vietnamese document to Unicode using a code page other than the default.
Public methodCopyStylesFromTemplateCopies styles from the specified template to a document.
Public methodCountNumberedItemsReturns the number of bulleted or numbered items and LISTNUM fields in the document.
Public methodCreateLetterContentCreates and returns a LetterContent object based on the specified letter elements.
Protected methodCreateRibbonExtensibilityObjectReturns an object that implements the Microsoft.Office.Core.IRibbonExtensibility interface.
Protected methodCreateRibbonObjectsReturns an array of OfficeRibbon objects to the CreateRibbonExtensibilityObject method.
Public methodDataFormDisplays the Data Form dialog box, in which you can add, delete, or modify data records.
Public methodDeleteAllCommentsDeletes all comments from the Comments collection in a document.
Public methodDeleteAllCommentsShownDeletes all revisions in the document that are displayed on the screen.
Public methodDeleteAllEditableRangesDeletes permissions in all ranges that the specified user or group of users has permission to modify.
Public methodDeleteAllInkAnnotationsDeletes all handwritten ink annotations in the document.
Public methodDetectLanguageAnalyzes the text in the document to determine the language that it is written in.
Public methodDisposeInfrastructure. Releases the resources used by the DocumentBase.
Public methodDowngradeDocumentChanges a document to the Word 97-2003 document format so that it can be edited in a previous version of Microsoft Office Word.
Public methodEditionOptionsInfrastructure.
Public methodEndInitInfrastructure.
Public methodEndReviewTerminates 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.
Public methodEqualsDetermines whether the specified object is equal to the current object. (Inherited from Object.)
Public methodExportAsFixedFormatSaves the document in PDF or XPS format.
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Protected methodFinishInitializationInfrastructure.
Public methodFitToPagesDecreases the font size of text just enough so that the document will fit on one fewer pages.
Public methodFollowHyperlinkResolves a hyperlink, or displays a cached document if the document has already been downloaded.
Public methodForwardMailerInfrastructure.
Public methodFreezeLayoutFixes 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.
Public methodget_ActiveWritingStyleInfrastructure. Use the ActiveWritingStyle property instead of this method.
Public methodget_CompatibilityInfrastructure. Use the Compatibility property instead of this method.
Protected methodGetAutomationObjectCalled by the Visual Studio Tools for Office runtime to get an object that can be used by VBA code in the document.
Public methodGetCrossReferenceItemsGets an array of items that can be cross-referenced based on the specified cross-reference type.
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Protected methodGetHostItem<T>Infrastructure.
Public methodGetLetterContentRetrieves letter elements from the document and returns a LetterContent.
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodGetWorkflowTasksReturns the workflow tasks that are assigned to the document.
Public methodGetWorkflowTemplatesReturns the workflow templates that are attached to the document.
Public methodGoToReturns a Microsoft.Office.Interop.Word.Range that represents the start position of the specified item, such as a page, bookmark, or field.
Protected methodInitializeInfrastructure.
Protected methodInitializeDataBindingsInfrastructure.
Public methodLockServerFileLocks the document on the server, which prevents anyone else from editing it.
Public methodMakeCompatibilityDefaultSets the compatibility options on the Compatibility tab in the Options dialog box as the default settings for new documents.
Public methodManualHyphenationInitiates manual hyphenation of a document, one line at a time. The user is prompted to accept or decline suggested hyphenations.
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodMergeMerges the changes marked with revision marks from one document to another.
Public methodMerge2000Infrastructure.
Protected methodOnShutdownInfrastructure.
Protected methodOnStartupInfrastructure.
Public methodPostPosts 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.
Public methodPresentItOpens Microsoft Office PowerPoint with the document loaded.
Public methodPrintOutPrints all or part of the document.
Public methodPrintOut2000Infrastructure.
Public methodPrintOutOldInfrastructure.
Public methodPrintPreviewSwitches the view to print preview.
Public methodProtectApplies one of several types of protection to the document.
Public methodProtect2002Infrastructure.
Protected methodProtectDocumentProvides you with an opportunity to reapply password protection to the document after the cached data has been saved.
Public methodRangeReturns a Microsoft.Office.Interop.Word.Range by using the specified starting and ending character positions.
Public methodRecheckSmartTagsRemoves smart tags recognized by the grammar checker and rechecks the document content against all smart tag recognizers.
Public methodRedoPerforms the last action that was undone (reverses the Undo method).
Public methodRejectAllRevisionsRejects all tracked changes in the document.
Public methodRejectAllRevisionsShownRejects all revisions in the document that are displayed on the screen.
Public methodReloadReloads a cached document by resolving the hyperlink to the document and downloading the document.
Public methodReloadAsReloads a document based on an HTML document, using the specified document encoding.
Public methodRemoveCustomizationRemoves the customization from the document.
Public methodRemoveDocumentInformationRemoves metadata, such as properties and comments, from a document.
Public methodRemoveDocumentWorkspaceHeaderInfrastructure.
Public methodRemoveLockedStylesPurges a document of locked styles when formatting restrictions have been applied in a document.
Public methodRemoveNumbersRemoves numbers or bullets from the document.
Public methodRemoveSmartTagsRemoves 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.
.
Public methodRemoveThemeRemoves the active theme from the document.
Public methodRepaginateRepaginates the entire document.
Public methodReplyOpens a new e-mail message for replying to the active message. The sender's address is included on the To: line.
Public methodReplyAllOpens 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.
Public methodReplyWithChangesSends 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.
Protected methodRequestServiceReturns an object that implements the Microsoft.Office.Core.IRibbonExtensibility interface in a document-level customization.
Public methodResetFormFieldsClears all form fields in a document, preparing the form to be filled in again.
Public methodRouteRoutes the document, using the document's current routing slip.
Public methodRunAutoMacroRuns an auto macro that is stored in the document.
Public methodRunLetterWizardRuns the Letter Wizard on the document.
Public methodSaveSaves the document. If the document has not been saved before, the Save As dialog box prompts the user for a file name.
Public methodSaveAsSaves 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.
Public methodSaveAs2Saves 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.
Public methodSaveAs2000Infrastructure.
Public methodSaveAsQuickStyleSetSaves the group of quick styles currently in use.
Public methodsbltInfrastructure.
Public methodSelectSelects the document.
Public methodSelectAllEditableRangesSelects all ranges that the specified user or group of users has permission to modify.
Public methodSelectContentControlsByTagReturns all the content controls in the document that have the specified tag.
Public methodSelectContentControlsByTitleReturns all the content controls in the document that have the specified title.
Public methodSelectLinkedControlsReturns all the content controls in the document that are linked to the specified custom XML node.
Public methodSelectNodesGets 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.
Public methodSelectSingleNodeReturns a Microsoft.Office.Interop.Word.XMLNode object that represents the first node in the document that matches the XPath parameter.
Public methodSelectUnlinkedControlsReturns all the content controls in the document that are not linked to a custom XML part.
Public methodSendFaxSends the document as a fax, without any user interaction.
Public methodSendFaxOverInternetSends the document to a fax service provider, who faxes the document to one or more specified recipients.
Public methodSendForReviewSends the document in an e-mail message for review by the specified recipients.
Public methodSendMailOpens a message window for sending the document through Microsoft Exchange.
Public methodSendMailerInfrastructure.
Public methodset_ActiveWritingStyleInfrastructure.
Public methodset_CompatibilityInfrastructure.
Public methodSetCompatibilityModeSets the compatibility mode for the document.
Public methodSetDefaultTableStyleSpecifies the table style to use for newly created tables in the document.
Public methodSetLetterContent
Public methodSetPasswordEncryptionOptionsSets the options Microsoft Office Word uses for encrypting documents with passwords.
Public methodToggleFormsDesignSwitches form design mode on or off.
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Public methodTransformDocumentApplies the specified Extensible Stylesheet Language Transformation (XSLT) file to the document and replaces the document with the results.
Public methodUndoUndoes the last action or a sequence of actions, which are displayed in the Undo list. Returns true if the actions were successfully undone.
Public methodUndoClearClears 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.
Public methodUnfreezeLayoutReverses the effect of FreezeLayout, and enables line breaks to change and ink annotations to move when you resize the Web browser window.
Public methodUnprotectRemoves protection from the document.
Protected methodUnprotectDocumentProvides you with an opportunity to remove password protection from the document and enable cached data to be saved.
Public methodUpdateStylesCopies all styles from the attached template into the document, overwriting any existing styles in the document that have the same name.
Public methodUpdateSummaryPropertiesUpdates the keyword and comment text in the Properties dialog box to reflect the AutoSummary content for the document.
Public methodViewCodeDisplays the code window for the selected ActiveX control in the document.
Public methodViewPropertyBrowserDisplays the property window for the selected ActiveX control in the specified document.
Public methodWebPagePreview
Top

  NameDescription
Public eventActivateEventOccurs when the document becomes the active window.
Public eventBeforeCloseOccurs immediately before the document closes.
Public eventBeforeDoubleClickOccurs when the editing area of the document window is double-clicked, before the default double-click action.
Public eventBeforePrintOccurs before the document is printed.
Public eventBeforeRightClickOccurs when the editing area of the document window is right-clicked, before the default right-click action.
Public eventBeforeSaveOccurs before the document is saved.
Public eventBindingContextChangedInfrastructure.
Public eventBuildingBlockInsertOccurs when a building block is inserted into a document.
Public eventCloseEventOccurs when the document is closed.
Public eventContentControlAfterAddOccurs after a content control is added to a document.
Public eventContentControlBeforeContentUpdateOccurs just before Microsoft Office Word updates the text in a content control, if the content control is bound to a custom XML part.
Public eventContentControlBeforeDeleteOccurs just before a content control is deleted from the document.
Public eventContentControlBeforeStoreUpdateOccurs 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).
Public eventContentControlOnEnterOccurs when the user clicks in a content control, or when the cursor is moved into a content control programmatically.
Public eventContentControlOnExitOccurs when the user clicks outside a content control, or when the cursor is moved outside a content control programmatically.
Public eventDeactivateOccurs when the active document window loses focus.
Public eventDisposedInfrastructure.
Public eventMailMergeAfterMergeOccurs after all records in a mail merge have merged successfully.
Public eventMailMergeAfterRecordMergeOccurs after each record in the data source successfully merges in a mail merge.
Public eventMailMergeBeforeMergeOccurs when a merge is executed, before any records merge.
Public eventMailMergeBeforeRecordMergeOccurs as a merge is executed for the individual records in a merge.
Public eventMailMergeDataSourceLoadOccurs when the data source is loaded for a mail merge.
Public eventMailMergeWizardSendToCustomOccurs when the custom button is clicked on step six of the Mail Merge Wizard.
Public eventMailMergeWizardStateChangeOccurs when a user changes from a specified step to a specified step in the Mail Merge Wizard.
Public eventNewOccurs when a new document is created.
Public eventOpenOccurs when the document is opened.
Public eventSelectionChangeOccurs when the selection changes in the document window.
Public eventShutdownOccurs when the document host item shuts down.
Public eventStartupOccurs after the document is running and all the initialization code in the assembly has been run.
Public eventSyncEventOccurs when the local copy of a document that is part of a Document Workspace is synchronized with the copy on the server.
Public eventWindowSizeOccurs when the document window is resized or moved.
Public eventXMLAfterInsertOccurs 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.
Public eventXMLBeforeDeleteOccurs 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

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:

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.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft