Microsoft KB Archive/97580

{|
 * width="100%"|

Excel AppNote: ME0185: Using Custom Help, Complete Text
'Article ID: Q97580

Creation Date: 14-APR-1993

Revision Date: 12-SEP-1996' The information in this article applies to:


 * Microsoft Excel for the Macintosh, versions 2.2, 3.0 and 4.0

The Application Note &quot;Using Custom Help,&quot; (ME0185) is now available from Microsoft Product Support Services. This Application Note discusses custom help for Microsoft Excel versions 2.2, 3.0, and 4.0 for the Macintosh. With custom help, you can create and display custom help files. You can call these help files directly with a macro statement, or you can access them from custom menus and custom dialog boxes. In Microsoft Excel version 4.0, you can also access custom help files from message boxes and input windows.

You can obtain this Application Note from the following sources:

You can obtain this Application Note from the following sources:


 * Microsoft's World Wide Web Site on the Internet
 * The Internet (Microsoft anonymous ftp server)
 * The Microsoft Network (MSN)
 * Microsoft Download Service (MSDL)
 * Microsoft Product Support Services

For complete information, see the &quot;To Obtain This Application Note&quot; section at the end of this article. THE TEXT OF ME0185

Microsoft(R) Product Support Services Application Note (Text File) ME0185: USING CUSTOM HELP Revision Date: 3/93 5 Pages, No Disk The following information applies to Microsoft Excel for the Macintosh, version 2.2, 3.0, 4.0. In Microsoft Excel versions 2.2, 3.0, and 4.0 for the Macintosh, you can create and display custom help files. You can call these help files directly with a macro statement, or you can access them from custom menus and custom dialog boxes. In Microsoft Excel version 4.0, you can also access custom help files from message alerts and input windows. CREATING A CUSTOM HELP FILE =========================== A custom help file is a text file that contains a header line and one or more lines of help text. The following text file, &quot;My Help&quot;, defines four help topics: *1,Introductory Help Topic This is the first sample help topic. *2,Dialog Box Help Topic This is the Dialog Box help topic. *3,Menu Item Help Topic This is the Menu Item help topic. *4, Alert or Input Box Help Topic In Microsoft Excel version 4.0, you can assign custom help topics to custom input and alert boxes. To create a custom help file, do the following:  In a text editor or word processor, open a new document.  In the first line of the document, type "<*topic_number,comment_text>" where &quot;topic_number &quot; is any number between 1 and 32767 (this number will be used to reference the help topic), and &quot;comment_text&quot; is any text you want to use to make a comment about the topic (this text will not be displayed in the Help dialog box).  Directly below the header line, enter one or more lines of text. This text will be the actual help text that appears in the Help dialog box. (If you want to place several help topics in the same file, add a second header line and help text immediately following the help text from the first topic. Repeat this procedure for each help topic you want to create.)  Save the file in a text file format. MOVING THROUGH A CUSTOM HELP FILE ================================= 
 * INFORMATION PROVIDED IN THIS DOCUMENT AND ANY SOFTWARE THAT MAY   |
 * ACCOMPANY THIS DOCUMENT (collectively referred to as an           |
 * Application Note) IS PROVIDED &quot;AS IS&quot; WITHOUT WARRANTY OF ANY     |
 * KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO   |
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A    |
 * PARTICULAR PURPOSE. The user assumes the entire risk as to the    |
 * accuracy and the use of this Application Note. This Application   |
 * Note may be copied and distributed subject to the following       |
 * conditions: 1) All text must be copied without modification and   |
 * all pages must be included; 2) If software is included, all files |
 * on the disk(s) must be copied without modification [the MS-DOS(R) |
 * utility DISKCOPY is appropriate for this purpose]; 3) All         |
 * components of this Application Note must be distributed together; |
 * and 4) This Application Note may not be distributed for profit.   |
 * Copyright 1990-1993 Microsoft Corporation. All Rights Reserved.   |
 * Microsoft and MS-DOS are registered trademarks and Windows        |
 * is a trademark of Microsoft Corporation.                          |
 * is a trademark of Microsoft Corporation.                          |

MICROSOFT EXCEL VERSION 4.0

In Microsoft Excel version 4.0, you move through a help file by clicking the left double arrows (to go to the previous help topic) or the right double arrows (to go to the next help topic). When you are in the first topic of your help file (1 in the sample text on page 1), the left double arrows appear to be available, but clicking them will have no effect. When you are in the last help topic of your help file (4 in the sample text on page 1), clicking the right double arrows will have no effect.

MICROSOFT EXCEL VERSIONS 2.2 AND 3.0

In Microsoft Excel versions 2.2 and 3.0, you move through a help file with the Previous button (to go to the previous help topic) and the Next button (to go to the next help topic). When you are in the first topic of your help file (1 in the sample text on page 1), the Previous button is unavailable (dimmed) because there are no help topics in the file with a lower topic number. When you are in the last topic of your help file (4 in the sample text on page 1), the Next button is unavailable because there are no help topics in the file with a greater topic number.

ACCESSING A CUSTOM HELP FILE ============================ To access a custom help file, you can:
 * Call it directly from a macro statement.
 * Assign it to a custom dialog box or a custom menu.

In Microsoft Excel version 4.0, you can also assign a custom help topic to an alert message or an input box. USING A MACRO STATEMENT

To call a custom help file from a macro statement, use the HELP macro function. The macro statement

=HELP(&quot;My Help!1&quot;) will call the first help topic from the custom help file &quot;My Help&quot;. USING A CUSTOM DIALOG BOX

To assign a custom help topic to a custom dialog box, enter the help topic in the form  in the upper-left corner of the dialog box definition table. For example, to access the second help topic from the custom help file &quot;My Help&quot;, you would create a table similar to the following:

A         B        C      D      E       F        G            H  1  Item #     x-pos    y-pos  Width  Height  Text     Init/Result  Comment 2 My Help!2                                 EXAMPLE 3 1                                         OK To call the dialog box from a macro statement, use the command: =DIALOG.BOX(A2:H3) To choose Help from a dialog box, press COMMAND+? when the dialog box is active. In the custom dialog box specified in the example above, COMMAND+? will call help topic number 2 from the custom help file &quot;My Help&quot;. FROM A CUSTOM MENU

To choose Help from a custom menu, press COMMAND+SHIFT+? to turn the cursor into a question mark while the custom menu is active, and then choose the command you need help with. If you use the custom menu defined in the following example, choosing the Custom command after pressing COMMAND+SHIFT+? will call help topic number 3 from the custom help file &quot;My Help&quot;:

A      B      C         D           E   --- 1  Command Macro  Cmnd Key  Message     Help Topic 2  Custom  A6     X         Help Sample My Help!3 To add the Custom command to the File menu, use the following macro command sequence: A  --- 4 =ADD.COMMAND(1,&quot;File&quot;,A2:E2) 5 =RETURN To delete the Custom command from the File menu, use the following macro command sequence: A  - 6 =DELETE.COMMAND(1,&quot;File&quot;,&quot;Custom&quot;) 7 =RETURN

FROM A CUSTOM INPUT OR ALERT BOX (VERSION 4.0 ONLY)

Microsoft Excel version 4.0 contains enhanced input and alert box types that include a Help button. To assign a custom help topic to one of these function types, enter the help topic in the form  as the  argument. For example, the following macro command

=ALERT(&quot;Click 'Help' for more info on Custom Help, 'OK' to  continue&quot;,1,&quot;My Help!1&quot;) assigns topic 1 from the custom help file &quot;My Help&quot; to an alert box. For more information about the arguments supported by the ALERT and INPUT functions, see the &quot;Microsoft Excel Function Reference&quot;, for version 4.0.

FORMATTING CUSTOM HELP FILES ============================

MICROSOFT EXCEL VERSION 4.0

Microsoft Excel version 4.0 does not support text formatting or jumping or definition hot spot commands. However, help files developed with the Windows 3.1 operating system that make use of these features can be directly ported to the Macintosh (with Apple Computer's Apple File Exchange [AFE] utility).

With the Windows 3.1 Help engine, you can develop complex and powerful custom help files for Microsoft Excel; for example, you can set jump topics and glossary items that take full advantage of the help window interface. For extensive help file development, we recommend that you use the Windows 3.1 Software Development Kit (SDK). For more information, or to order the Windows 3.1 SDK, call Microsoft Consumer Sales at (800) 426-9400.

MICROSOFT EXCEL VERSIONS 2.2 AND 3.0

In Microsoft Excel versions 2.2 and 3.0, use the following commands to format help text and to define how you want to move between help topics.

Text Formatting Commands

In the following tables of commands, a &quot;#&quot; represents a number in decimal ASCII format and a &quot;$&quot; represents a sequence of characters. Type a space after each special formatting character sequence.

Command Description                       Sample Text of                                           Custom Help File Entry \p#    Paragraph format command. # represents an index number in a table of formats. The paragraph formats currently supported are:

0 = regular format (left           justified, ragged right            paragraphs) 1 = centered paragraphs           \p1 Welcome to... Centers the paragraph beginning with the phrase &quot;Welcome to&quot;

\f#    Text format command. #            \f7 Custom Help for represents the index number       Microsoft Excel formats in the following table of         the text &quot;Custom fonts, sizes, and styles. The     Help for Microsoft fonts currently supported are:    Excel&quot; with the font 0 = Geneva, 10-point, normal    Geneva, 18-point bold. 1 = Geneva, 10-point, bold 2 = Geneva, 10-point, italic 3 = Geneva, 10-point, underlined 4 = Geneva, 10-point, double underlined 5 = Geneva, 10-point, bold and italic 6 = Geneva, 18-point, normal 7 = Geneva, 18-point, bold 8 = Geneva, 18-point, italic 9 = Geneva, 18-point, underlined 10 = Geneva, 18-point, double underlined 11 = Geneva, 18-point, bold and italic 12 = Symbol, 10-point, normal 13 = Symbol, 10-point, bold 14 = Symbol, 10-point, italic 15 = Symbol, 10-point, underlined 16 = Symbol, 10-point, double underlined 17 = Symbol, 10-point, bold and italic 18 = Chicago, 12-point, normal 19 = Chicago, 12-point, underlined 20 = Chicago, 12-point, double underlined 21 = Chicago, 12-point, bold and italic Hot Spot Commands

Command   Description                 Sample Entry \J# $ \j  Jump hot spot command. #      *1,Sample Jump Topic represents the topic number   \p1\ f6\ J2 John\j is my           to jump to. $ represents      friend. the characters that will be   Formats the text &quot;John is my           underlined in the help text    friend&quot; using the font as the hot spot. (This        Geneva, 18-point normal.           command must be entered with   When you click the word           uppercase and lowercase        &quot;John&quot;, the macro jumps to           characters as shown.)          help topic 2, listed below: *2,Jump Number 1 \p1 \f7 John was born in 1910.

\D# $ \d  Definitions hot spot command. # represents the     *3, Sample Definition topic number to appear         \D4 Help \d in the opened definition       Formats the text as: window. $ represents the       Help characters that will be                   underlined (dotted underline)   When you click the word in the help text as the hot    &quot;Help,&quot; the definition in           spot. (This command must be    helptopic 4 will pop up           entered with uppercase and      within a definition box.           lowercase characters as         *4,Definition of Term           shown.)                         \f5 Help ...n. Assistance, Aid, Contribution, Donation, Provision. Text Control Commands

Command Description - \n       Line break command. The new line command adds a carriage return to the help text. \t      Next tab command. This command moves the cursor to the next tab position in the help text file. \\      Show backslash command. This command displays a single backslash (\) character. Text Positioning Commands

The following commands must precede the paragraphs to which they apply. Type a space after the numeric value (#).

Command Description --  \x#      Defines the position of a tab stop in twips (20 twips = 1            point). \l#     Defines the indent of the left margin of the paragraph in twips. \F#     Defines the indent of the first line of the paragraph in twips. \o#     Defines the amount of space to leave above the paragraph in            twips. TO OBTAIN THIS APPLICATION NOTE

You can find by.SEA, a self-extracting file, on the following services:

  Microsoft's World Wide Web Site on the Internet On the www.microsoft.com home page, click the Support icon. Click Knowledge Base, and select the product. Enter kbfile by.SEA, and click GO! Open the article, and click the button to download the file.   Internet (anonymous FTP) ftp ftp.microsoft.com Change to the Softlib/Mslfiles folder. Get by.SEA </li>  The Microsoft Network On the Edit menu, click Go To, and then click Other Location. Type &quot;mssupport&quot; (without the quotation marks). Double-click the MS Software Library icon. Find the appropriate product area. Locate and Download by.SEA. </li>  Microsoft Download Service (MSDL) Dial (206) 936-6735 to connect to MSDL Download by.SEA </li></ul>

For additional information about downloading, please see the following article in the Microsoft Knowledge Base: ARTICLE-ID: Q119591 TITLE    : How to Obtain Microsoft Support Files from Online Services
 * If you are unable to access the source(s) listed above, you can have this Application Note mailed or faxed to you by calling Microsoft Product Support Services Monday through Friday, 6:00 A.M. to 6:00 P.M. Pacific time at (206) 635-7080. If you are outside the United States, contact the Microsoft subsidiary for your area. To locate your subsidiary, call Microsoft International Customer Service at (206) 936-8661.
 * }

-

"THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED &quot;AS IS&quot; WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY." '' ©1997 Microsoft Corporation. All rights reserved. Legal Notices.

''

KBCategory: kbappnote kbfile

KBSubcategory:

Additional reference words: 2.2 2.20 3.0 3.00 4.0 4.00