Microsoft.office.interop.word dll


















Returns or sets a ParagraphFormat object that represents the paragraph settings for the specified range, selection, find or replacement operation, or style. Returns a Replacement object that contains the criteria for a replace operation. Returns or sets what happens if the search begins at a point other than the beginning of the document and the end of the document is reached or vice versa if Forward is set to False or if the search text isn't found in the specified selection or range.

Removes text and paragraph formatting from a selection or from the formatting specified in a find or replace operation. Removes the highlighting for all text located in a hit highlighting find operation, and returns a Boolean that represents whether the operation was successful. Runs the specified find operation. Returns True if the find operation is successful. Highlights all found matches and returns a Boolean that represents whether matches were found. Skip to main content. This browser is no longer supported.

Download Microsoft Edge More info. Contents Exit focus mode. Find Interface Definition Namespace: Microsoft. Word Assembly: Microsoft. Represents the criteria for a find operation. 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 and Microsoft Office Word , or later versions, installed on your computer.

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. On the File menu, point to New , and then click Project. The New Project dialog box appears. 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 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. If you do not see the assemblies, you may need to ensure they are installed and displayed. In Solution Explorer , right-click the Program. Paste the following class definition into Program. Add the following code to the Main method to create a bankAccounts list that contains two accounts.

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.

Add Type. 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.

The foreach 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. Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support. Feedback will be sent to Microsoft: By pressing the submit button, your feedback will be used to improve Microsoft products and services.

Privacy policy. To use the features of a Microsoft Office application from an Office project, you must use the primary interop assembly PIA for the application.

Interested in developing solutions that extend the Office experience across multiple platforms? Check out the new Office Add-ins model. When you create a new Office project, Visual Studio adds references to the PIAs that are required to build the project.

Separate primary interop assemblies to build and run projects. Use features of multiple Microsoft Office applications in a single project. Full list of primary interop assemblies for Microsoft Office applications. For more information about primary interop assemblies, see Primary interop assemblies. Visual Studio uses different sets of the PIAs on the development computer. These different sets of assemblies are in the following locations:. This set of the assemblies is used when you write code and build projects.

Visual Studio installs these assemblies automatically. This set of the assemblies is used during some development tasks, such as when you run or debug projects. Visual Studio doesn't install and register these assemblies; you need to do it yourself.

The PIAs are automatically added to a location in the file system, outside of the global assembly cache, while you install Visual Studio. When you create a new project, Visual Studio automatically adds references to these copies of the PIAs to your project.



0コメント

  • 1000 / 1000