- Microsoft Office Interop Word Dll
- Microsoft.office.interop.word Download
- Microsoft Office Interop Word Font
Visual C# has features that simplify access to Office API objects. The new features include named and optional arguments, a new type called
dynamic
, and the ability to pass arguments to reference parameters in COM methods as if they were value parameters.In this topic you will use the new features to write code that creates and displays a Microsoft Office Excel worksheet. You will then write code to add an Office Word document that contains an icon that is linked to the Excel worksheet.
To complete this walkthrough, you must have Microsoft Office Excel 2007 and Microsoft Office Word 2007, or later versions, installed on your computer.
Represents a mathematical function or structure that Microsoft Office Word supports, such as fractions, integrals, sums, and radicals. The OMathFunction object is a member of the OMathFunctions collection. Microsoft.Office.Interop.Word.dll Use this primary interface only when the method you want to use shares the same name as an event of the COM object; in this case, cast to this interface to call the method, and cast to the latest events interface to connect to the event.
Note
Your computer might show different names or locations for some of the Visual Studio user interface elements in the following instructions. The Visual Studio edition that you have and the settings that you use determine these elements. For more information, see Personalizing the IDE.
To create a new console application
- Start Visual Studio.
- On the File menu, point to New, and then click Project. The New Project dialog box appears.
- In the Installed Templates pane, expand Visual C#, and then click Windows.
- Look at the top of the New Project dialog box to make sure that .NET Framework 4 (or later version) is selected as a target framework.
- In the Templates pane, click Console Application.
- Type a name for your project in the Name field.
- Click OK.The new project appears in Solution Explorer.
To add references
- In Solution Explorer, right-click your project's name and then click Add Reference. The Add Reference dialog box appears.
- On the Assemblies page, select Microsoft.Office.Interop.Word in the Component Name list, and then hold down the CTRL key and select Microsoft.Office.Interop.Excel. If you do not see the assemblies, you may need to ensure they are installed and displayed. See How to: Install Office Primary Interop Assemblies.
- Click OK.
To add necessary using directives
- In Solution Explorer, right-click the Program.cs file and then click View Code.
- Add the following
using
directives to the top of the code file:
To create a list of bank accounts
- Paste the following class definition into Program.cs, under the
Program
class. - Add the following code to the
Main
method to create abankAccounts
list that contains two accounts.
To declare a method that exports account information to Excel
- Add the following method to the
Program
Desmume games download. class to set up an Excel worksheet.Method Add has an optional parameter for specifying a particular template. Optional parameters, new in C# 4, enable you to omit the argument for that parameter if you want to use the parameter's default value. Because no argument is sent in the following code,Add
uses the default template and creates a new workbook. The equivalent statement in earlier versions of C# requires a placeholder argument:ExcelApp.Workbooks.Add(Type.Missing)
. - Add the following code at the end of
DisplayInExcel
. The code inserts values into the first two columns of the first row of the worksheet. - Add the following code at the end of
DisplayInExcel
. Theforeach
loop puts the information from the list of accounts into the first two columns of successive rows of the worksheet. - Add the following code at the end of
DisplayInExcel
to adjust the column widths to fit the content.Earlier versions of C# require explicit casting for these operations becauseExcelApp.Columns[1]
returns anObject
, andAutoFit
is an Excel Range method. The following lines show the casting.C# 4, and later versions, converts the returnedObject
todynamic
automatically if the assembly is referenced by the /link compiler option or, equivalently, if the Excel Embed Interop Types property is set to true. True is the default value for this property.
To run the project
- Add the following line at the end of
Main
. - Press CTRL+F5.An Excel worksheet appears that contains the data from the two accounts.
To add a Word document
- To illustrate additional ways in which C# 4, and later versions, enhances Office programming, the following code opens a Word application and creates an icon that links to the Excel worksheet.Paste method
CreateIconInWordDoc
, provided later in this step, into theProgram
class.CreateIconInWordDoc
uses named and optional arguments to reduce the complexity of the method calls to Add and PasteSpecial. These calls incorporate two other new features introduced in C# 4 that simplify calls to COM methods that have reference parameters. First, you can send arguments to the reference parameters as if they were value parameters. That is, you can send values directly, without creating a variable for each reference parameter. The compiler generates temporary variables to hold the argument values, and discards the variables when you return from the call. Second, you can omit theref
keyword in the argument list.TheAdd
method has four reference parameters, all of which are optional. In C# 4.0 and later versions, you can omit arguments for any or all of the parameters if you want to use their default values. In C# 3.0 and earlier versions, an argument must be provided for each parameter, and the argument must be a variable because the parameters are reference parameters.ThePasteSpecial
method inserts the contents of the Clipboard. The method has seven reference parameters, all of which are optional. The following code specifies arguments for two of them:Link
, to create a link to the source of the Clipboard contents, andDisplayAsIcon
, to display the link as an icon. In C# 4.0 and later versions, you can use named arguments for those two and omit the others. Although these are reference parameters, you do not have to use theref
keyword, or to create variables to send in as arguments. You can send the values directly. In C# 3.0 and earlier versions, you must supply a variable argument for each reference parameter.In C# 3.0 and earlier versions of the language, the following more complex code is required. - Add the following statement at the end of
Main
. - Add the following statement at the end of
DisplayInExcel
. TheCopy
method adds the worksheet to the Clipboard. - Press CTRL+F5.A Word document appears that contains an icon. Double-click the icon to bring the worksheet to the foreground.
To set the Embed Interop Types property
- Additional enhancements are possible when you call a COM type that does not require a primary interop assembly (PIA) at run time. Removing the dependency on PIAs results in version independence and easier deployment. For more information about the advantages of programming without PIAs, see Walkthrough: Embedding Types from Managed Assemblies.In addition, programming is easier because the types that are required and returned by COM methods can be represented by using the type
dynamic
instead ofObject
. Variables that have typedynamic
are not evaluated until run time, which eliminates the need for explicit casting. For more information, see Using Type dynamic.In C# 4, embedding type information instead of using PIAs is default behavior. Because of that default, several of the previous examples are simplified because explicit casting is not required. For example, the declaration ofworksheet
inDisplayInExcel
is written asExcel._Worksheet workSheet = excelApp.ActiveSheet
rather thanExcel._Worksheet workSheet = (Excel.Worksheet)excelApp.ActiveSheet
. The calls toAutoFit
in the same method also would require explicit casting without the default, becauseExcelApp.Columns[1]
returns anObject
, andAutoFit
is an Excel method. The following code shows the casting. - To change the default and use PIAs instead of embedding type information, expand the References node in Solution Explorer and then select Microsoft.Office.Interop.Excel or Microsoft.Office.Interop.Word.
- If you cannot see the Properties window, press F4.
- Find Embed Interop Types in the list of properties, and change its value to False. Equivalently, you can compile by using the /reference compiler option instead of /link at a command prompt.
To add additional formatting to the table
- Replace the two calls to
AutoFit
inDisplayInExcel
with the following statement.The AutoFormat method has seven value parameters, all of which are optional. Named and optional arguments enable you to provide arguments for none, some, or all of them. In the previous statement, an argument is supplied for only one of the parameters,Format
. BecauseFormat
is the first parameter in the parameter list, you do not have to provide the parameter name. However, the statement might be easier to understand if the parameter name is included, as is shown in the following code. - Press CTRL+F5 to see the result. Other formats are listed in the XlRangeAutoFormat enumeration.
- Compare the statement in step 1 with the following code, which shows the arguments that are required in C# 3.0 and earlier versions.
Example
The following code shows the complete example.
See also
-->Definition
This is a primary interface in a COM coclass that is required by managed code for interoperability with the corresponding COM object. Use this primary interface only when the method you want to use shares the same name as an event of the COM object; in this case, cast to this interface to call the method, and cast to the latest events interface to connect to the event. Otherwise, use the .NET interface that is derived from the COM coclass to access methods, properties, and events of the COM object. For information about the COM object, see Document
- Derived
- Attributes
Properties
Microsoft Office Interop Word Dll
_CodeName_CodeName_CodeName | Reserved for internal use. |
ActiveThemeActiveThemeActiveTheme | Returns the name of the active theme plus the theme formatting options for the specified document. |
ActiveThemeDisplayNameActiveThemeDisplayNameActiveThemeDisplayName | Returns the display name of the active theme for the specified document. |
ActiveWindowActiveWindowActiveWindow | Returns a Window object that represents the active window. |
ActiveWritingStyle[Object]ActiveWritingStyle[Object]ActiveWritingStyle[Object] | Returns or sets the writing style for a specified language in the specified document. |
ApplicationApplicationApplication | Returns an Application object that represents the Microsoft Word application. |
AttachedTemplateAttachedTemplateAttachedTemplate | Returns a Template object that represents the template attached to the specified document. |
AutoFormatOverrideAutoFormatOverrideAutoFormatOverride | Returns or sets a Boolean that represents whether automatic formatting options override formatting restrictions in a document where formatting restrictions are in effect. |
AutoHyphenationAutoHyphenationAutoHyphenation | Determines if automatic hyphenation is turned on for the specified document. |
BackgroundBackgroundBackground | Returns a Shape object that represents the background image for the specified document. |
BibliographyBibliographyBibliography | Returns the bibliography references contained within a document. Read-only. |
BookmarksBookmarksBookmarks | Returns a Bookmarks collection that represents all the bookmarks in a document. |
BroadcastBroadcastBroadcast | Returns a Broadcast object that represents a broadcast session, in which presenters can present Word documents to remote participants over the web without the participants needing to have rich clients installed. |
BuiltInDocumentPropertiesBuiltInDocumentPropertiesBuiltInDocumentProperties | Returns a DocumentProperties collection that represents all the built-in document properties for the specified document. |
CharactersCharactersCharacters | Returns a Characters collection that represents the characters in a document. |
ChartDataPointTrackChartDataPointTrackChartDataPointTrack | Returns or sets a Boolean (bool in C#) that specifies whether charts in the active document use cell-reference>n-ary objects other than integrals. Read/write. |
OMathRightMarginOMathRightMarginOMathRightMargin | Returns or sets the right margin for equations. Read/write. |
OMathsOMathsOMaths | Returns the OMath objects within the specified range. Read-only. |
OMathSmallFracOMathSmallFracOMathSmallFrac | Returns or sets a Boolean that represents whether to use small fractions in equations contained within the document. Read/write. |
OMathWrapOMathWrapOMathWrap | Returns the placement of the second line of an equation that wraps to a new line. Read/write. |
OpenEncodingOpenEncodingOpenEncoding | Returns the encoding used to open the specified document. |
OptimizeForWord97OptimizeForWord97OptimizeForWord97 | Determines if Microsoft Word optimizes the current document for viewing in Word 97. |
OriginalDocumentTitleOriginalDocumentTitleOriginalDocumentTitle | Returns the document title for the original document after running a legal-blackline document compare function. Read-only. |
PageSetupPageSetupPageSetup | Returns a PageSetup object that's associated with the specified document. |
ParagraphsParagraphsParagraphs | Returns a Paragraphs collection that represents all the paragraphs in the specified document. |
ParentParentParent | Returns an object that represents the parent object of the specified object. |
PasswordPasswordPassword | Sets a password that must be supplied to open the specified document. |
PasswordEncryptionAlgorithmPasswordEncryptionAlgorithmPasswordEncryptionAlgorithm | Returns a String indicating the algorithm Microsoft Word uses for encrypting documents with passwords. |
PasswordEncryptionFilePropertiesPasswordEncryptionFilePropertiesPasswordEncryptionFileProperties | Returns True if Microsoft Word encrypts file properties for password-protected documents. |
PasswordEncryptionKeyLengthPasswordEncryptionKeyLengthPasswordEncryptionKeyLength | Returns an Integer indicating the key length of the algorithm Microsoft Word uses when encrypting documents with passwords. |
PasswordEncryptionProviderPasswordEncryptionProviderPasswordEncryptionProvider | Returns the name of the algorithm encryption provider that Microsoft Word uses when encrypting documents with passwords. |
PathPathPath | Returns the disk or Web path to the specified object. |
PermissionPermissionPermission | Returns a Permission object that represents the permission settings in the specified document. |
PrintFormsDataPrintFormsDataPrintFormsData | Determines if Microsoft Word prints onto a preprinted form only the data entered in the corresponding online form. |
PrintFractionalWidthsPrintFractionalWidthsPrintFractionalWidths | This object, member, or enumeration is deprecated and is not intended to be used in your code. |
PrintPostScriptOverTextPrintPostScriptOverTextPrintPostScriptOverText | Determines if 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. |
PrintRevisionsPrintRevisionsPrintRevisions | Determines if revision marks are printed with the document. |
ProtectionTypeProtectionTypeProtectionType | Returns the protection type for the specified document. |
ReadabilityStatisticsReadabilityStatisticsReadabilityStatistics | Returns a ReadabilityStatistics collection that represents the readability statistics for the specified document. |
ReadingLayoutSizeXReadingLayoutSizeXReadingLayoutSizeX | Returns or sets an Integer that represents the width of pages in a document when it is displayed in reading layout view and is frozen for entering handwritten markup. |
ReadingLayoutSizeYReadingLayoutSizeYReadingLayoutSizeY | Returns or sets an Integer that represents the height of pages in a document when it is displayed in reading layout view and is frozen for entering handwritten markup. |
ReadingModeLayoutFrozenReadingModeLayoutFrozenReadingModeLayoutFrozen | Sets or returns a Boolean that represents whether pages displayed in reading layout view are frozen to a specified size for inserting handwritten markup into a document. |
ReadOnlyReadOnlyReadOnly | Determines if changes to the document cannot be saved to the original document. |
ReadOnlyRecommendedReadOnlyRecommendedReadOnlyRecommended | Determines if Word displays a message box whenever a user opens the document, suggesting that it be opened as read-only. |
RemoveDateAndTimeRemoveDateAndTimeRemoveDateAndTime | Returns or sets a Boolean indicating whether a document stores the date and time metadata for tracked changes. |
RemovePersonalInformationRemovePersonalInformationRemovePersonalInformation | Determines if Microsoft Word removes all user information from comments, revisions, and the Properties dialog box upon saving a document. |
ResearchResearchResearch | Returns the research service for a document. Read-only. |
RevisedDocumentTitleRevisedDocumentTitleRevisedDocumentTitle | Returns the document title for a revised document after running a legal-blackline document compare function. Read-only. |
RevisionsRevisionsRevisions | Returns a Revisions collection that represents the tracked changes in the document or range. |
RoutedRoutedRouted | Determines if the specified document has been routed to the next recipient. |
RoutingSlipRoutingSlipRoutingSlip | Returns a RoutingSlip object that represents the routing slip information for the specified document. |
SavedSavedSaved | Determines if the specified document or template hasn't changed since it was last saved. |
SaveEncodingSaveEncodingSaveEncoding | Returns or sets the encoding to use when saving a document. |
SaveFormatSaveFormatSaveFormat | Returns an Integer representing the file format of the specified document or file converter. |
SaveFormsDataSaveFormsDataSaveFormsData | Determines if Microsoft Word saves the data entered in a form as a tab-delimited record for use in a database. |
SaveSubsetFontsSaveSubsetFontsSaveSubsetFonts | Determines if Microsoft Word saves a subset of the embedded TrueType fonts with the document. |
ScriptsScriptsScripts | Returns a Scripts collection that represents the collection of HTML scripts in the specified object. |
SectionsSectionsSections | Returns a Sections collection that represents the sections in the specified document. |
SentencesSentencesSentences | Returns a Sentences collection that represents all the sentences in the document. |
ServerPolicyServerPolicyServerPolicy | Returns the policy specified for a document stored on a server running Microsoft Office SharePoint Server 2007. Read-only. |
ShapesShapesShapes | Returns a Shapes collection that represents all the Shape objects in the specified document. |
SharedWorkspaceSharedWorkspaceSharedWorkspace | Returns a SharedWorkspace object that represents the Document Workspace in which a specified document is located. |
ShowGrammaticalErrorsShowGrammaticalErrorsShowGrammaticalErrors | Determines if grammatical errors are marked by a wavy green line in the specified document. |
ShowRevisionsShowRevisionsShowRevisions | This object, member, or enumeration is deprecated and is not intended to be used in your code. |
ShowSpellingErrorsShowSpellingErrorsShowSpellingErrors | Determines if Microsoft Word underlines spelling errors in the document. |
ShowSummaryShowSummaryShowSummary | Determines if an automatic summary is displayed for the specified document. |
SignaturesSignaturesSignatures | Returns a SignatureSet object that represents the digital signatures for a document. |
SmartDocumentSmartDocumentSmartDocument | Returns a SmartDocument object that represents the settings for a smart document solution. |
SmartTagsSmartTagsSmartTags | Returns a SmartTags object that represents a smart tag in a document. |
SmartTagsAsXMLPropsSmartTagsAsXMLPropsSmartTagsAsXMLProps | Determines whether Microsoft Word creates an XML header containing smart tag information when a document containing smart tags is saved as HTML. |
SnapToGridSnapToGridSnapToGrid | Determines if AutoShapes or East Asian characters are automatically aligned with an invisible grid when they are drawn, moved, or resized in the specified document. |
SnapToShapesSnapToShapesSnapToShapes | Determines if Microsoft 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 specified document. |
SpellingCheckedSpellingCheckedSpellingChecked | Determines if spelling has been checked throughout the specified range or document. |
SpellingErrorsSpellingErrorsSpellingErrors | Returns a ProofreadingErrors collection that represents the words identified as spelling errors in the specified document or range. |
StoryRangesStoryRangesStoryRanges | Returns a StoryRanges collection that represents all the stories in the specified document. |
StylesStylesStyles | Returns a Styles collection for the specified document. |
StyleSheetsStyleSheetsStyleSheets | Returns a StyleSheets object that represents the Web style sheets attached to a document. |
StyleSortMethodStyleSortMethodStyleSortMethod | Returns or sets the sort method to use when sorting styles in the Styles task pane. Read/write. |
SubdocumentsSubdocumentsSubdocuments | Returns a Subdocuments collection that represents all the subdocuments in the specified range or document. |
SummaryLengthSummaryLengthSummaryLength | Returns or sets the length of the summary as a percentage of the document length. |
SummaryViewModeSummaryViewModeSummaryViewMode | Returns or sets the way a summary is displayed. |
SyncSyncSync | Returns a Sync object that provides access to the methods and properties for documents that are part of a Document Workspace. |
TablesTablesTables | Returns a Tables collection that represents all the tables in the specified document. |
TablesOfAuthoritiesTablesOfAuthoritiesTablesOfAuthorities | Returns a TablesOfAuthorities collection that represents the tables of authorities in the specified document. |
TablesOfAuthoritiesCategoriesTablesOfAuthoritiesCategoriesTablesOfAuthoritiesCategories | Returns a TablesOfAuthoritiesCategories collection that represents the available tables of authorities categories for the specified document. |
TablesOfContentsTablesOfContentsTablesOfContents | Returns a TablesOfContents collection that represents the tables of contents in the specified document. |
TablesOfFiguresTablesOfFiguresTablesOfFigures | Returns a TablesOfFigures collection that represents the tables of figures in the specified document. |
TextEncodingTextEncodingTextEncoding | Returns or sets the code page, or character set, that Microsoft Word uses for a document saved as an encoded text file. |
TextLineEndingTextLineEndingTextLineEnding | Cnc text engraving software. Returns or sets a WdLineEndingType constant indicating how Microsoft Word marks the line and paragraph breaks in documents saved as text files. |
TrackFormattingTrackFormattingTrackFormatting | Returns or sets a Boolean that represents whether to track formatting changes when change tracking is turned on. Read/write. |
TrackMovesTrackMovesTrackMoves | Returns or sets aBoolean that represents whether to mark moved text when Track Changes is turned on. Read/write. |
TrackRevisionsTrackRevisionsTrackRevisions | Determines if changes are tracked in the specified document. |
TypeTypeType | Returns the document type (template or document). |
UpdateStylesOnOpenUpdateStylesOnOpenUpdateStylesOnOpen | Determines if the styles in the specified document are updated to match the styles in the attached template each time the document is opened. |
UseMathDefaultsUseMathDefaultsUseMathDefaults | Returns or sets a Boolean that represents whether to use the default math settings when creating new equations. Read/write. |
UserControlUserControlUserControl | Determines if the document or application was created or opened by the user. |
VariablesVariablesVariables | Returns a Variables collection that represents the variables stored in the specified document. |
VBASignedVBASignedVBASigned | Determines if the Visual Basic for Applications (VBA) project for the specified document has been digitally signed. |
VBProjectVBProjectVBProject | Returns the VBProject object for the specified template or document. |
VersionsVersionsVersions | Returns a Versions collection that represents all the versions of the specified document. |
WebOptionsWebOptionsWebOptions | Returns the WebOptions object, which contains document-level attributes used by Microsoft Word when you save a document as a Web page or open a Web page. |
WindowsWindowsWindows | Returns a Windows collection that represents all windows for the specified document (for example, Sales.doc:1 and Sales.doc:2). |
WordOpenXMLWordOpenXMLWordOpenXML | Returns the flat XML format for the Word Open XML contents of the document. Read-only. |
WordsWordsWords | Returns a Words collection that represents all the words in a document. |
WritePasswordWritePasswordWritePassword | Sets a password for saving changes to the specified document. |
WriteReservedWriteReservedWriteReserved | Determines if the specified document is protected with a write password. |
XMLHideNamespacesXMLHideNamespacesXMLHideNamespaces | This object, member, or enumeration is deprecated and is not intended to be used in your code. |
XMLNodesXMLNodesXMLNodes | This object, member, or enumeration is deprecated and is not intended to be used in your code. |
XMLSaveDataOnlyXMLSaveDataOnlyXMLSaveDataOnly | This object, member, or enumeration is deprecated and is not intended to be used in your code. |
XMLSaveThroughXSLTXMLSaveThroughXSLTXMLSaveThroughXSLT | Returns or sets a String that specifies the path and file name for the Extensible Stylesheet Language Transformation (XSLT) to apply when a user saves a document. |
XMLSchemaReferencesXMLSchemaReferencesXMLSchemaReferences | Returns an XMLSchemaReferences collection that represents the schemas attached to a document. |
XMLSchemaViolationsXMLSchemaViolationsXMLSchemaViolations | This object, member, or enumeration is deprecated and is not intended to be used in your code. |
XMLShowAdvancedErrorsXMLShowAdvancedErrorsXMLShowAdvancedErrors | Returns or sets a Boolean that represents whether error message text is generated from the built-in Microsoft Word error messages or from the Microsoft XML Core Services (MSXML) 5.0 component included with Office. |
XMLUseXSLTWhenSavingXMLUseXSLTWhenSavingXMLUseXSLTWhenSaving | Returns a Boolean that represents whether to save a document through an Extensible Stylesheet Language Transformation (XSLT). |
Methods
Microsoft.office.interop.word Download
AcceptAllRevisions()AcceptAllRevisions()AcceptAllRevisions() | Accepts all tracked changes in the specified document. |
AcceptAllRevisionsShown()AcceptAllRevisionsShown()AcceptAllRevisionsShown() | Accepts all revisions in the specified document that are displayed on the screen. |
Activate()Activate()Activate() | Activates the specified object. |
AddDocumentWorkspaceHeader(Boolean, String, String, String, String)AddDocumentWorkspaceHeader(Boolean, String, String, String, String)AddDocumentWorkspaceHeader(Boolean, String, String, String, String) | Reserved for internal use. |
AddMeetingWorkspaceHeader(Boolean, String, String, String, String)AddMeetingWorkspaceHeader(Boolean, String, String, String, String)AddMeetingWorkspaceHeader(Boolean, String, String, String, String) | Reserved for internal use. |
AddToFavorites()AddToFavorites()AddToFavorites() | Creates a shortcut to the document or hyperlink and adds it to the Favorites folder. |
ApplyDocumentTheme(String)ApplyDocumentTheme(String)ApplyDocumentTheme(String) | Applies a document theme to a document. |
ApplyQuickStyleSet(String)ApplyQuickStyleSet(String)ApplyQuickStyleSet(String) | Changes the set of quick styles listed. |
ApplyQuickStyleSet2(Object)ApplyQuickStyleSet2(Object)ApplyQuickStyleSet2(Object) | Applies the specified Quick Style set to the document. |
ApplyTheme(String)ApplyTheme(String)ApplyTheme(String) | Applies a theme to an open document. |
AutoFormat()AutoFormat()AutoFormat() | Automatically formats a document. |
AutoSummarize(Object, Object, Object)AutoSummarize(Object, Object, Object)AutoSummarize(Object, Object, Object) | Creates an automatic summary of the specified document, and returns a Range object. |
CanCheckin()CanCheckin()CanCheckin() | Determines if Microsoft Word can check in a specified document to a server. |
CheckConsistency()CheckConsistency()CheckConsistency() | Searches all text in a Japanese language document and displays instances where character usage is inconsistent for the same words. |
CheckGrammar()CheckGrammar()CheckGrammar() | Begins a spelling and grammar check for the specified document or range. |
CheckIn(Boolean, Object, Boolean)CheckIn(Boolean, Object, Boolean)CheckIn(Boolean, Object, Boolean) | Returns a document from a local computer to a server, and sets the local document to read-only so that it cannot be edited locally. |
CheckInWithVersion(Boolean, Object, Boolean, Object)CheckInWithVersion(Boolean, Object, Boolean, Object)CheckInWithVersion(Boolean, Object, Boolean, Object) | 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()CheckNewSmartTags()CheckNewSmartTags() | Accesses the Microsoft Office Web site for available smart tag recognizer and action files. |
CheckSpelling(Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object)CheckSpelling(Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object)CheckSpelling(Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object) | Begins a spelling check for the specified document or range. |
Close(Object, Object, Object)Close(Object, Object, Object)Close(Object, Object, Object) | Closes the specified document or documents. |
ClosePrintPreview()ClosePrintPreview()ClosePrintPreview() | Switches the specified document from print preview to the previous view. If the specified document isn't in print preview, an error occurs. |
Compare(String, Object, Object, Object, Object, Object, Object, Object)Compare(String, Object, Object, Object, Object, Object, Object, Object)Compare(String, Object, Object, Object, Object, Object, Object, Object) | Displays revision marks that indicate where the specified document differs from another document. |
Compare2000(String)Compare2000(String)Compare2000(String) | Reserved for internal use. |
Compare2002(String, Object, Object, Object, Object, Object)Compare2002(String, Object, Object, Object, Object, Object)Compare2002(String, Object, Object, Object, Object, Object) | Reserved for internal use. |
ComputeStatistics(WdStatistic, Object)ComputeStatistics(WdStatistic, Object)ComputeStatistics(WdStatistic, Object) | Returns a statistic based on the contents of the specified document. |
Convert()Convert()Convert() | Converts file to the newest file format and enables all new features. |
ConvertAutoHyphens()ConvertAutoHyphens()ConvertAutoHyphens() | Converts hyphens created by automatic hyphenation to manual hyphens. |
ConvertNumbersToText(Object)ConvertNumbersToText(Object)ConvertNumbersToText(Object) | Changes the list numbers and LISTNUM fields in the specified object to text. |
ConvertVietDoc(Int32)ConvertVietDoc(Int32)ConvertVietDoc(Int32) | Reconverts a Vietnamese document to Unicode using a code page other than the default. |
CopyStylesFromTemplate(String)CopyStylesFromTemplate(String)CopyStylesFromTemplate(String) | Copies styles from the specified template to a document. |
CountNumberedItems(Object, Object)CountNumberedItems(Object, Object)CountNumberedItems(Object, Object) | Returns the number of bulleted or numbered items and LISTNUM fields in the specified object. |
CreateLetterContent(String, Boolean, String, WdLetterStyle, Boolean, WdLetterheadLocation, Single, String, String, String, WdSalutationType, String, String, String, String, String, String, String, String, String, String, String, Int32, Object, Object, Object, Object, Object, Object, Object, Object)CreateLetterContent(String, Boolean, String, WdLetterStyle, Boolean, WdLetterheadLocation, Single, String, String, String, WdSalutationType, String, String, String, String, String, String, String, String, String, String, String, Int32, Object, Object, Object, Object, Object, Object, Object, Object)CreateLetterContent(String, Boolean, String, WdLetterStyle, Boolean, WdLetterheadLocation, Single, String, String, String, WdSalutationType, String, String, String, String, String, String, String, String, String, String, String, Int32, Object, Object, Object, Object, Object, Object, Object, Object) | Creates and returns a LetterContent object based on the specified letter elements. |
DataForm()DataForm()DataForm() | Displays the Data Form dialog box, in which you can add, delete, or modify data records. |
DeleteAllComments()DeleteAllComments()DeleteAllComments() | Deletes all comments from the Comments collection in a document. |
DeleteAllCommentsShown()DeleteAllCommentsShown()DeleteAllCommentsShown() | Deletes all revisions in a specified document that are displayed on the screen. |
DeleteAllEditableRanges(Object)DeleteAllEditableRanges(Object)DeleteAllEditableRanges(Object) | Deletes permissions in all ranges for which the specified user or group of users has permission to modify. |
DeleteAllInkAnnotations()DeleteAllInkAnnotations()DeleteAllInkAnnotations() | Deletes all handwritten ink annotations in a document. |
DetectLanguage()DetectLanguage()DetectLanguage() | Analyzes the specified text to determine the language that it is written in. |
DowngradeDocument()DowngradeDocument()DowngradeDocument() | Downgrades a document to the Word 97-2003 document format so that it can be edited in a previous version of Microsoft Office Word. |
Dummy1()Dummy1()Dummy1() | Reserved for internal use. |
Dummy2()Dummy2()Dummy2() | Reserved for internal use. |
Dummy3()Dummy3()Dummy3() | Reserved for internal use. |
Dummy4()Dummy4()Dummy4() | Reserved for internal use. |
EditionOptions(WdEditionType, WdEditionOption, String, Object)EditionOptions(WdEditionType, WdEditionOption, String, Object)EditionOptions(WdEditionType, WdEditionOption, String, Object) | This object, member, or enumeration is deprecated and is not intended to be used in your code. |
EndReview()EndReview()EndReview() | Terminates a review of a file that has been sent for review using the SendForReview(Object, Object, Object, Object) method or that has been automatically placed in a review cycle by sending a document to another user in an e-mail message. |
ExportAsFixedFormat(String, WdExportFormat, Boolean, WdExportOptimizeFor, WdExportRange, Int32, Int32, WdExportItem, Boolean, Boolean, WdExportCreateBookmarks, Boolean, Boolean, Boolean, Object)ExportAsFixedFormat(String, WdExportFormat, Boolean, WdExportOptimizeFor, WdExportRange, Int32, Int32, WdExportItem, Boolean, Boolean, WdExportCreateBookmarks, Boolean, Boolean, Boolean, Object)ExportAsFixedFormat(String, WdExportFormat, Boolean, WdExportOptimizeFor, WdExportRange, Int32, Int32, WdExportItem, Boolean, Boolean, WdExportCreateBookmarks, Boolean, Boolean, Boolean, Object) | Saves a document as PDF or XPS format. |
FitToPages()FitToPages()FitToPages() | Decreases the font size of text just enough so that the document will fit on one fewer pages. |
FollowHyperlink(Object, Object, Object, Object, Object, Object, Object)FollowHyperlink(Object, Object, Object, Object, Object, Object, Object)FollowHyperlink(Object, Object, Object, Object, Object, Object, Object) | Displays a cached document if it's already been downloaded. Otherwise, this method resolves the hyperlink, downloads the target document, and displays the document in the appropriate application. |
ForwardMailer()ForwardMailer()ForwardMailer() | This object, member, or enumeration is deprecated and is not intended to be used in your code. |
FreezeLayout()FreezeLayout()FreezeLayout() | In Web view, fixes the layout of the document as it currently appears so that line breaks remain fixed and ink annotations do not move when you resize the window. |
GetCrossReferenceItems(Object)GetCrossReferenceItems(Object)GetCrossReferenceItems(Object) | Returns an array of items that can be cross-referenced based on the specified cross-reference type. |
GetLetterContent()GetLetterContent()GetLetterContent() | Retrieves letter elements from the specified document and returns a LetterContent object. |
GetWorkflowTasks()GetWorkflowTasks()GetWorkflowTasks() | Returns the workflow tasks assigned to a document. |
GetWorkflowTemplates()GetWorkflowTemplates()GetWorkflowTemplates() | Returns the workflow templates attached to a document. |
GoTo(Object, Object, Object, Object)GoTo(Object, Object, Object, Object)GoTo(Object, Object, Object, Object) | Returns a Range object that represents the start position of the specified item. |
LockServerFile()LockServerFile()LockServerFile() | Locks the file on the server preventing anyone else from editing it. |
MakeCompatibilityDefault()MakeCompatibilityDefault()MakeCompatibilityDefault() | Sets the compatibility options on the Compatibility tab in the Options dialog box (Tools menu) as the default settings for new documents. |
ManualHyphenation()ManualHyphenation()ManualHyphenation() | Initiates manual hyphenation of a document, one line at a time. The user is prompted to accept or decline suggested hyphenations. |
Merge(String, Object, Object, Object, Object)Merge(String, Object, Object, Object, Object)Merge(String, Object, Object, Object, Object) | Merges the changes marked with revision marks from one document to another. |
Merge2000(String)Merge2000(String)Merge2000(String) | Reserved for internal use. |
Post()Post()Post() | Posts the specified 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()PresentIt()PresentIt() | Opens PowerPoint with the specified Word document loaded. |
PrintOut(Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object)PrintOut(Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object)PrintOut(Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object) | Prints all or part of the specified document. |
PrintOut2000(Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object)PrintOut2000(Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object)PrintOut2000(Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object) | Reserved for internal use. |
PrintOutOld(Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object)PrintOutOld(Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object)PrintOutOld(Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object) | Reserved for internal use. |
PrintPreview()PrintPreview()PrintPreview() | Switches the view to print preview. |
Protect(WdProtectionType, Object, Object, Object, Object)Protect(WdProtectionType, Object, Object, Object, Object)Protect(WdProtectionType, Object, Object, Object, Object) | Helps to protect the specified document from changes. When a document is protected, users can make only limited changes, such as adding annotations, making revisions, or completing a form. |
Protect2002(WdProtectionType, Object, Object)Protect2002(WdProtectionType, Object, Object)Protect2002(WdProtectionType, Object, Object) | Reserved for internal use. |
Range(Object, Object)Range(Object, Object)Range(Object, Object) | Returns a Range object by using the specified starting and ending character positions. |
RecheckSmartTags()RecheckSmartTags()RecheckSmartTags() | Removes smart tags recognized by the grammar checker and rechecks the document content against all smart tag recognizers. |
Redo(Object)Redo(Object)Redo(Object) | Redoes the last action that was undone (reverses the Undo(Object) method). Returns True if the actions were redone successfully. |
RejectAllRevisions()RejectAllRevisions()RejectAllRevisions() | Rejects all tracked changes in the specified document. |
RejectAllRevisionsShown()RejectAllRevisionsShown()RejectAllRevisionsShown() | Rejects all revisions in a document that are displayed on the screen. |
Reload()Reload()Reload() | Reloads a cached document by resolving the hyperlink to the document and downloading it. |
ReloadAs(MsoEncoding)ReloadAs(MsoEncoding)ReloadAs(MsoEncoding) | Reloads a document based on an HTML document, using the specified document encoding. |
RemoveDocumentInformation(WdRemoveDocInfoType)RemoveDocumentInformation(WdRemoveDocInfoType)RemoveDocumentInformation(WdRemoveDocInfoType) | Removes sensitive information, properties, comments, and other metadata from a document. |
RemoveDocumentWorkspaceHeader(String)RemoveDocumentWorkspaceHeader(String)RemoveDocumentWorkspaceHeader(String) | Reserved for internal use. |
RemoveLockedStyles()RemoveLockedStyles()RemoveLockedStyles() | Purges a document of locked styles when formatting restrictions have been applied in a document. |
RemoveNumbers(Object)RemoveNumbers(Object)RemoveNumbers(Object) | Removes numbers or bullets from the specified object. |
RemoveSmartTags()RemoveSmartTags()RemoveSmartTags() | Removes all smart tag information from a document. |
RemoveTheme()RemoveTheme()RemoveTheme() | Removes the active theme from the current document. |
Repaginate()Repaginate()Repaginate() | Repaginates the entire document. |
Reply()Reply()Reply() | This object, member, or enumeration is deprecated and is not intended to be used in your code. |
ReplyAll()ReplyAll()ReplyAll() | This object, member, or enumeration is deprecated and is not intended to be used in your code. |
ReplyWithChanges(Object)ReplyWithChanges(Object)ReplyWithChanges(Object) | Sends an e-mail message to the author of a document that has been sent out for review, notifying them that a reviewer has completed review of the document. |
ResetFormFields()ResetFormFields()ResetFormFields() | Clears all form fields in a document, preparing the form to be filled in again. |
ReturnToLastReadPosition()ReturnToLastReadPosition()ReturnToLastReadPosition() | Returns the active document to the last saved reading position, and returns an integer that represents that position. |
Route()Route()Route() | Routes the specified document, using the document's current routing slip. |
RunAutoMacro(WdAutoMacros)RunAutoMacro(WdAutoMacros)RunAutoMacro(WdAutoMacros) | Runs an auto macro that's stored in the specified document. If the specified auto macro doesn't exist, nothing happens. |
RunLetterWizard(Object, Object)RunLetterWizard(Object, Object)RunLetterWizard(Object, Object) | Runs the Letter Wizard on the specified document. |
Save()Save()Save() | Saves the specified document. If the document hasn't been saved before, the Save As dialog box prompts the user for a file name. |
SaveAs(Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object)SaveAs(Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object)SaveAs(Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object) | Saves the specified document with a new name or format. Some of the arguments for this method correspond to the options in the Save Asdialog box (File menu). |
SaveAs2(Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object)SaveAs2(Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object)SaveAs2(Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object) | Saves the specified document with a new name or format. Some of the arguments for this method correspond to the options in the Save As dialog box (File tab). |
SaveAs2000(Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object)SaveAs2000(Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object)SaveAs2000(Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object) | Reserved for internal use. |
SaveAsQuickStyleSet(String)SaveAsQuickStyleSet(String)SaveAsQuickStyleSet(String) | Saves the group of quick styles currently in use. |
SaveCopyAs(Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object)SaveCopyAs(Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object)SaveCopyAs(Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object) | |
sblt(String)sblt(String)sblt(String) | Reserved for internal use. |
Select()Select()Select() | Selects the specified object. |
SelectAllEditableRanges(Object)SelectAllEditableRanges(Object)SelectAllEditableRanges(Object) | Selects all ranges for which the specified user or group of users has permission to modify. |
SelectContentControlsByTag(String)SelectContentControlsByTag(String)SelectContentControlsByTag(String) | Returns a ContentControls collection that represents all the content controls in a document with the tag value specified in the Tag parameter. Read-only. |
SelectContentControlsByTitle(String)SelectContentControlsByTitle(String)SelectContentControlsByTitle(String) | Returns a ContentControls collection that represents all the content controls in a document with the title specified in the Title parameter. Read-only. |
SelectLinkedControls(CustomXMLNode)SelectLinkedControls(CustomXMLNode)SelectLinkedControls(CustomXMLNode) | Returns a ContentControls collection that represents all content controls in a document that are linked to the specific custom XML node in the document's XML data store as specified by the Node parameter. Read-only. |
SelectNodes(String, String, Boolean)SelectNodes(String, String, Boolean)SelectNodes(String, String, Boolean) | Returns an XMLNodes collection that represents all the specified nodes in the order in which they appear in the document. |
SelectSingleNode(String, String, Boolean)SelectSingleNode(String, String, Boolean)SelectSingleNode(String, String, Boolean) | Returns an XMLNode object that represents a node in the specified document. |
SelectUnlinkedControls(CustomXMLPart)SelectUnlinkedControls(CustomXMLPart)SelectUnlinkedControls(CustomXMLPart) | Returns all of the content controls in a document that are not linked to an XML node in the document's XML data store. Read-only. |
SendFax(String, Object)SendFax(String, Object)SendFax(String, Object) | Sends the specified document as a fax, without any user interaction. |
SendFaxOverInternet(Object, Object, Object)SendFaxOverInternet(Object, Object, Object)SendFaxOverInternet(Object, Object, Object) | Sends a document to a fax service provider, who faxes the document to one or more specified recipients. |
SendForReview(Object, Object, Object, Object)SendForReview(Object, Object, Object, Object)SendForReview(Object, Object, Object, Object) | Sends a document in an e-mail message for review by the specified recipients. |
SendMail()SendMail()SendMail() | Opens a message window for sending the specified document through Microsoft Exchange. |
SendMailer(Object, Object)SendMailer(Object, Object)SendMailer(Object, Object) | This object, member, or enumeration is deprecated and is not intended to be used in your code. |
SetCompatibilityMode(Int32)SetCompatibilityMode(Int32)SetCompatibilityMode(Int32) | Sets the compatibility mode for the document. |
SetDefaultTableStyle(Object, Boolean)SetDefaultTableStyle(Object, Boolean)SetDefaultTableStyle(Object, Boolean) | Specifies the table style to use for newly created tables in a document. |
SetLetterContent(Object)SetLetterContent(Object)SetLetterContent(Object) | Inserts the contents of the specified LetterContent object into a document. |
SetPasswordEncryptionOptions(String, String, Int32, Object)SetPasswordEncryptionOptions(String, String, Int32, Object)SetPasswordEncryptionOptions(String, String, Int32, Object) | Sets the options Microsoft Word uses for encrypting documents with passwords. |
ToggleFormsDesign()ToggleFormsDesign()ToggleFormsDesign() | Toggles form design mode on or off. |
TransformDocument(String, Boolean)TransformDocument(String, Boolean)TransformDocument(String, Boolean) | Applies the specified Extensible Stylesheet Language Transformation (XSLT) file to the specified document and replaces the document with the results. |
Undo(Object)Undo(Object)Undo(Object) | 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()UndoClear()UndoClear() | Clears the list of actions that can be undone for the specified document. Corresponds to the list of items that appears when you click the arrow beside the Undo button on the Standard toolbar. |
UnfreezeLayout()UnfreezeLayout()UnfreezeLayout() | Reverses the effect of UnfreezeLayout(), and enables line breaks to change and ink annotations to move when you resize the Web browser window. |
Unprotect(Object)Unprotect(Object)Unprotect(Object) | Removes protection from the specified document. If the document isn't protected, this method generates an error. |
UpdateStyles()UpdateStyles()UpdateStyles() | Copies all styles from the attached template into the document, overwriting any existing styles in the document that have the same name. |
UpdateSummaryProperties()UpdateSummaryProperties()UpdateSummaryProperties() | This object, member, or enumeration is deprecated and is not intended to be used in your code. |
ViewCode()ViewCode()ViewCode() | Displays the code window for the selected ActiveX control in the specified document. |
ViewPropertyBrowser()ViewPropertyBrowser()ViewPropertyBrowser() | Displays the property window for the selected ActiveX control in the specified document. |
WebPagePreview()WebPagePreview()WebPagePreview() | Displays a preview of the current document as it would look if saved as a Web page. |