Share via


Using Help Controls [Office 2003 SDK Documentation]

When you create Help text for display in the Document Actions task pane, you create it by using Extensible Hypertext Markup Language (XHTML). You can either hard-code the Help text into the smart document dynamic-link library (DLL) code or you can reference external XHTML files. However, not all XHTML elements and attributes are allowed.

Formatting Help text

The following information describes supported XHTML elements and attributes, and supported cascading style sheets (CSS) properties.

Supported XHTML elements

The Document Actions task pane supports the following XHTML elements and attributes that apply to the elements.

Element Description
A Specifies hyperlinks.
AttributeDescription
hrefSpecifies the path to a hyperlinked Web page or document.Note  Hyperlinks are displayed using hyperlink formatting (meaning that they are underlined and in a different color), but clicking them doesn't open the specified Web page. To create functioning hyperlinks that open a Web page, use a hyperlink control. For more information on hyperlink controls, see Formatting Smart Document Controls.
Attribute Description
href Specifies the path to a hyperlinked Web page or document.Note  Hyperlinks are displayed using hyperlink formatting (meaning that they are underlined and in a different color), but clicking them doesn't open the specified Web page. To create functioning hyperlinks that open a Web page, use a hyperlink control. For more information on hyperlink controls, see Formatting Smart Document Controls.
B Specifies bold text.
BR Inserts a line break.
CENTER Centers text horizontally in the task pane.
FONT Specifies font characteristics.
AttributeDescription
faceSpecifies the name of the font.
sizeSpecifies the size of the font within a range of 1 through 7, with 7 representing the largest font.
Attribute Description
face Specifies the name of the font.
size Specifies the size of the font within a range of 1 through 7, with 7 representing the largest font.
H1-H6 Specifies heading levels.
I Specifies italicized text.
LI Specifies an item in a list.
OL Specifies a numbered list.
P Specifies a paragraph.
SPAN Specifies an inline text block.
U Specifies underlined text.
UL Specifies a bulleted list.

Additional supported XHTML attributes

The following supported attributes apply to all elements.

Attribute Applies to elements
class Specifies the name of a CSS rule.
dir Specifies the reading order for text. For bidirectional text support only. May be one of the following values.
ValueDescription
ltrSpecifies left-to-right reading order.
rtlSpecifies right-to-left reading order.
Value Description
ltr Specifies left-to-right reading order.
rtl Specifies right-to-left reading order.
lang Specifies the language of the text. May be any ISO standard language abbreviation. For more information about ISO standard language abbreviations, see Language Codes on MSDN®, the Microsoft Developer Network. For bidirectional text support only.

Supported CSS attributes

You can format the HTML text displayed in the task pane using CSS. The list of supported properties is shown in the following table. Where appropriate, supported values and measurement types are indicated.

Attribute Supported values and measurement types
Font-family Any font installed on the client computer. 
Font-size Relative sizes and twips only (a twip is one-twentieth of a point).
Font-weight Bold only.
Font-style Italic only.
Font-color Hexadecimal Web-safe color values only. Do not use color names.
Text-decoration Underline only.
Text-indent Twips only.
Margin-left Twips only.
Margin-right Twips only.
Margin-top Twips only.
Margin-bottom Twips only.

Working with Unicode characters

To get Unicode characters to appear properly in the task pane, you need to use the following META element to indicate that your Help text is in Unicode format.

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>

Using the API

Use the PopulateHelpContent method to specify either the hard-coded text to display for the Help text or the path and file name of the file that contains the Help text. For code examples on how to work with Help text, see the "Help Content" topic in one of the following tutorials: