Parameter Info

When you type the name of a property or method and then type an open parenthesis (the "(" key), the Visual Studio IDE displays the necessary parameters, indicating optional ones. This works in the same way as it does in VBA; square brackets ([ ]) surrounding the parameter indicates that the parameter is optional and can be excluded. You also see a description of each parameter, as shown in Figure 2.23. As you type additional parameters, the description is updated.

[5earchDirection As Microsoft.Office.Interop.Excel.XISearchDirection = Microsoft.Office.Intercip.Excel.XISearchDirection.xINext], [MatchCase As Object],

Figure 2.23. Parameter Info for the Find method of an Excel NamedRange

This rich IntelliSense provides summaries of types, members, and parameters inside IntelliSense tool tips in the Code Editor and in the Object Browser for types or members that exist in the Microsoft.Office.Tools.Excel and Microsoft.Office.Tools.Word namespaces. If you want to have the same type of IntelliSense (with the addition of the summary description) for Microsoft.Office.Tools.Outlook or for the primary interop assemblies (Microsoft.Office.Interop.Word, Microsoft.Office.Interop.Excel, and Microsoft.Office.Interop.Outlook), you must install the IntelliSense XML Files for Visual Studio Tools for Office Developers XML files. To download and install these files, search for "VSTO IntelliSense" on the Microsoft Download Center at http://www.microsoft.com/downloads. Without these IntelliSense XML files, you still get IntelliSense capabilities such as list members and Parameter Info, but you will not have the additional summary descriptions.

0 0

Post a comment