Designers for COM add-ins, RTD servers, smart tags
Excel Automation add-ins, Xll in C#, VB.NET, C++
Add-in Express
for Microsoft .net
Add-in Express Home > Add-in Express.NET > Online Guide > Designers
Add-in Expresss .NET designers
There are several Add-in Express Designer types responsible for common tasks in automating Microsoft Office 2007 - 2000 in .NET (C#, VB.NET, C++). Below you see a list of Office automation tasks. Each task includes an introductory description, the Add-in Express Designer type available for the task, and Add-in Express components available.
- COM Add-ins - ADXAddinModule
- RTD Servers - ADXRtdServerModule
- Smart Tags - ADXSmartTagModule
- Excel Automation add-ins - ADXExcelAddinModule
- Excel XLL add-ins
- Excel Workbooks - ADXExcelSheetModule
- Word Documents - ADXWordDocumentModule
COM add-ins
COM Add-ins have been around since Office 2000 when Microsoft allowed Office applications to extend their features with COM DLLs supporting the IDTExtensibility2 interface (it is a COM interface, of course). Since then thousands of developers have racked their brains over this interface, and the Office Object Model that provided COM objects representing command bars, command bar controls, etc. These were the sources of Add-in Express.
ADXAddinModule represents a COM Add-in in any Office application. To add another add-in to your assembly, add another ADXAddinModule to your project. For the add-in, you specify its name, host application(s) and load behavior. The typical value for the LoadBehavior property is Connected & LoadAtStartup. For Outlook add-ins, you specify the Options page and Folder Property pages (see the Outlook Property page). See the following Add-in Express components that you add onto the ADXAddinModule: Office 2007 Ribbon components, Command bars, Command bar controls, Built-in Control Connector, Keyboard shortcut, Outlook Bar Shortcut Manager, Outlook Forms Manager, and Application-level events.
Use the AddinStartupComplete and AddinBeginShutdown events to handle add-in startup and shutdown. See a sample Excel add-in project.
RTD servers
RTD Server is a technology introduced in Excel 2002 (XP). It is a great way to display constantly changing data such as stock quotes, currency exchange rates, inventory levels, price quotes, weather information, sports scores, and so on.
A short terminology list:
- RTD server is a Component Object Model (COM) Automation server that implements the IRtdServer interface. Excel uses the RTD server to communicate with a real-time data source on one or more topics.
- Real-time data source is any source of data that you can access programmatically.
- Topic is a string (or a set of strings) that uniquely identifies a piece of data that resides in a real-time data source. The RTD server passes the topic to the real-time data source and receives the value of the topic from the real-time data source; the RTD server then passes the value of the topic to Excel for display. For example, the RTD server passes the topic "New Topic" to the real-time data source, and the RTD server receives the topic's value of "72.12" from the real-time data source. The RTD server then passes the topic's value to Excel for display.
ADXRtdServerModule represents an Excel RTD Server. The only Add-in Express component allowed for this designer is the RTD Topic. The module provides the Interval property that indicates the time interval between updates (in milliseconds).
You refer to an existing RTD Server using the RTD worksheet function in Excel:
=RTD(ProgID, Server, String1, String2, ... String28)
The ProgID parameter is a required string value representing the programmatic ID (ProgID) of the RTD server. See attributes of the RTDServerModule class for the ProgId of your RTD Server. The current version of Add-in Express requires the Server parameter to be an empty string. Use two quotation marks (""). The String1 through String28 parameters represent topics of the RTD server. Only the String1 parameter is required; the String2 through String28 parameters are optional. In most cases, the String1 parameter will be enough for you. The actual values for the String1 through String28 parameters depend on the requirements of the real-time data server. See a sample RTD server project.
Smart tags
Office XP bestowed Smart Tags upon us in Word and Excel. Office 2003 added PowerPoint to the list of smart tag host applications. This technology provides Office users with more interactivity for the content of their Office documents. A smart tag is an element of text in an Office document having custom actions associated with it. Smart tags allow recognizing such text using either a dictionary-based or a custom-processing approach. An example of such text might be an e-mail address you type into a Word document or an Excel workbook. When smart tag recognizes the e-mail address, it allows the user to choose one of the actions associated with the text. For e-mail addresses, possible actions are to look up additional contact information or send a new e-mail message to that contact.
ADXSmartTagModule lies at the base of the Add-in Express Smart Tags. It represents a set or a library of smart tag recognizers in Excel, Word, and PowerPoint. The only Add-in Express component you add to the designer is Smart Tag. See how to build smart tags for Word and Excel.
Excel Automation add-ins
Excel 2002 brought in Automation Add-ins – a technology that allows writing user-defined functions for use in Excel formulas. Add-in Express .NET provides you with a specialized module, COM Excel Add-in Module, that reduces this task to just writing one ore more user-defined functions. A typical function accepts one or more Excel ranges and/or other parameters. Excel shows the resulting value of the function in the cell where the user calls the function.
You develop Excel Automation Add-ins using the COM Excel Add-in module in COM Add-in projects. You add this module to your COM Add-in project by choosing the COM Excel Add-in Module item in the Add New Item dialog. This adds an ADXExcelAddinModule to the project. The module represents an Excel Automation add-in in Add-in Express. It does not provide any properties. Also, there are no Add-in Express components to use with the module. See how to create Excel Automation Add-in step-by-step.
Excel XLL add-ins
An XLL is a DLL written in such a way that Excel can open it directly. Like Excel Automation add-ins, XLL add-ins are mostly used to create user-defined functions, however they do it much faster. This technology was introduced in Excel 4.0; Wikipedia states that this happened in 1992! Since then, XLL interfaces have been available for C and C++ developers only. Now, Add-in Express hides XLL complexities for .NET developers.
To create an XLL add-in, choose Add-in Express XLL Add-in in the New Project dialog. The project designer class is ADXXLLModule (XLL add-in module). The module contains a special class, XLLContainer, where you add your public static (in VB, Public Shared) functions. Just adding a function is enough for a quick start. Using the module's designer, you are able to specify all other function-related stuff: description, help reference, category, descriptions of the function's parameters, etc. In addition, you can instruct Excel to call your function whenever recalculation is required (IsVolatile property). Another option is specifying a parameter of the Object type to accept Excel ranges as a reference to an object of the ADXExcelRef type or as a 2D array of values. See a sample XLL add-in project.
Note! The current version of Add-in Express supports XLL except for multi-threaded calculations introduced in Excel 2007.
Excel workbooks
Sometimes you need to automate a given Excel workbook (template). You can do it with ADXExcelSheetModule that represents one worksheet of the workbook. The Document property allows creating and browsing for the workbook. If you choose creating a new workbook, the dialog appears where you specify the name and location of the workbook as well as the Property Name and Property Value textboxes. Add-in Express adds this property to the list of custom properties of the workbook and uses the name and value of the property in order to recognize the workbook. Accordingly, you specify the PropertyId and PropertyValue properties of the module. The module provides a full set of events available for an Excel workbook. More about customizing Excel workbooks.
Note! A sample project for this module type is located in C:\Program Files\Add-in Express\Add-in Express 2008 for .NET %edition%\Demo Projects\VS.NET %VS version%\Advanced\MS Forms\ExcelTimesheet\.
Word documents
To automate a given Word document, you use the ADXWordDocumentModule. The module allows creating and browsing for the document. If you choose creating a new document, the dialog appears where you specify the name and location of the document as well as the Property Name and Property Value textboxes. Add-in Express adds this property to the list of custom properties of the document and uses the name and value of the property in order to recognize the document. Accordingly, you specify the PropertyId and PropertyValue properties of the module. The module provides a full set of events available for Word document.
Note! A sample project for this module type is located in C:\Program Files\Add-in Express\Add-in Express 2008 for .NET %edition%\Demo Projects\VS.NET %VS version%\Advanced\MS Forms\WordFax\.
>> Components |
Back to Add-in Express.NET homepage

