Visual Studio 2005 VBA

Creating Word and Excel Smart Tags with VSTO

Visual Studio Vba

Because VSTO smart tags are available only to the document or workbook in which you add them, you can scope the smart tags to a specific solution rather than create smart tags that might be available to any document that is opened. VSTO provides two smart tag classes Microsoft.Office.Tools.Excel.SmartTag and Microsoft.Office.Tools.Word.SmartTag that enable you to add smart tags to your document or workbook. You enable Word or Excel to recognize certain terms by using these classes to add...

List Object Control Events

Table 7.2 shows the events that are available for a ListObject control in VSTO. Table 7.2. Events of the ListObject Control Table 7.2. Events of the ListObject Control Raised when a user attempts to add a new row to a data-bound ListObject. This event is not raised when a new row is programmatically added to the ListObject, only when the user interface is used to add the row. Raised when the ListObject control is double-clicked. The BeforeDoubleClick event handler of a ListObject control...

Exploring Solution Explorer

2006 Passat Abs Fuse Location

Visual Studio projects are displayed and managed in a window called Solution Explorer. Solution Explorer acts as a container for all the items in your solution. For example, the solution might contain multiple projects, and each project might contain multiple items such as code files, Windows forms, or resources. When you create a VSTO solution, Visual Studio automatically creates a project for the solution, along with a default set of associated items. For example, when you create an Excel...

User Forms Versus Windows Forms

Vba Windows Forms

When you use VBA to create an Office solution, you can design a user interface to display a dialog box. To do so, you add a UserForm to your project and then add controls to the UserForm. These controls are Figure 4.7. A UserForm in VBA that contains all the default ActiveX controls Figure 4.7. A UserForm in VBA that contains all the default ActiveX controls referred to as ActiveX controls. Whenever the UserForm has focus, the Toolbox, which contains all the default controls, becomes visible....

Creating an Interop Excel Application

To create the sample Excel application, which calculates the distance between two points in two-dimensional space, you will use a user defined function written in VBA. 1. Open a new Excel document, and save it as CalculateDistance.xls to a location of your choice. 2. Create the spreadsheet shown in Figure 12.8. JI > - I Z - Ii 100 B Get Work Items i Pubtsh Refresh Configure List D j M B Figure 12.8. Calculating the distance between two points Figure 12.8. Calculating the distance between two...

Converting a Recorded VBA Macro to Visual Basic in VSTO

In this section, you will record a simple macro in VBA and then convert the code to Visual Basic 2005. This example is similar to the one in Chapter 6 in that you will record a macro that sets the selection to bold and italic. However, there isn't any toggle enumeration available in Excel that is similar to Word's wdToggle enumeration. Using Excel, you must write additional code to apply and remove the bold and italic formatting. 1. Open an Excel workbook outside Visual Studio, and type some...