SetContents

Designates a specific topic as the Contents topic in the specified Help file.

Syntax

SetContents("filename", context-number)

Parameter Description

filename Name of the Help file that contains the desired Contents topic. The filename must be enclosed in quotation marks.
context-number Context number of the topic in the specified Help file. The context number must be defined in the [MAP] section of the destination Help file’s project file.

Example

The following macro sets the topic mapped to the “101” context ID number in the PROGMAN.HLP file as the Contents topic:

SetContents("progman.hlp", 101)

After this macro executes, choosing the Contents button causes a jump to the topic mapped to 101.

Comments

If Windows Help cannot find the Help file, it displays an error message and does not perform the jump.

If the context number does not exist or cannot be found in the [MAP] section, Windows Help displays an error message. (For more information about context numbers, see “[MAP] Section” in Chapter 16, “The Help Project File.”)

See Also

Contents, JumpContents