Share via


Introduction to Working with Smart Document Controls [Office 2003 SDK Documentation]

When you are working with the controls on the task pane, you can adjust how they are displayed and how they function. You use the ISmartDocProperties interface to modify the display properties for all smart document controls. For more information about the available properties for controls that are not listed below, see the ISmartDocProperties interface reference topic.

The following list provides additional information about working with and using each of the smart document controls:

  • ActiveX controls  The C_TYPE_ACTIVEX control allows you to use ActiveX® controls if one of the built-in controls doesn't work for your project. ActiveX controls provide an extensible framework in which to create your smart documents. For more information about working with ActiveX controls, see Using ActiveX Controls.
  • Check box, combo box, list box, radio button, and text box controls   The C_TYPE_CHECKBOX, C_TYPE_COMBO, C_TYPE_LISTBOX, C_TYPE_RADIOGROUP, and C_TYPE_TEXTBOX smart document controls function much like the corresponding controls on Windows® Forms and Web Forms. The most important issue when you are working with these controls is determining which method you will use to maintain state information; these controls don't automatically maintain their state when they are used in smart documents. For information about maintaining the state of these controls, see Maintaining the State of Smart Document Controls.
  • Document fragment controls  The C_TYPE_DOCUMENTFRAGMENT and C_TYPE_DOCUMENTFRAGMENTURL smart document controls allow you to create pieces of text, or boilerplate text, that your users can easily add to a new document. The text for document fragments can be either hard-coded strings within your code or external documents that you reference from within your code. For more information about using both internal and external document fragments, see Using Document Fragments.
  • Help controls  The Document Actions task pane doesn't support all HTML elements, attributes, and cascading style sheets (CSS) formatting. For more information about supported HTML elements and attributes as well as CSS formatting for C_TYPE_HELP and C_TYPE_HELPURL smart document controls, see Using Help Controls.
  • Hyperlink controls  The C_TYPE_LINK smart document control allows you to create links within your smart document. These links can open Web pages, open documents in other applications, or even execute an application. The tutorials in this software development kit that demonstrate creating hyperlink controls use the Microsoft Internet Controls to open a Web page in Microsoft® Internet Explorer. However, you can use hyperlinks as command buttons; for example, you can have a hyperlink control that validates your document when the user clicks it. Anything that you can do in code, you can make a hyperlink control do.
  • Image controls  The C_TYPE_IMAGE smart document control displays images in the Document Actions task pane. You can work with those images in different ways by inserting code into the InvokeControl method. For more information about how to do this, see the Adding Images tutorial for your chosen programming language.
  • Additional controls  The C_TYPE_SEPARATOR and C_TYPE_LABEL smart document controls provide lines and labels, respectively. These controls have no special formatting issues. For more information about these specific controls, see the Smart Document API Reference.