You are here: Tips and Techniques for Word > Using WinHelp Macros in Word > Running WinHelp Macros

Running WinHelp Macros

There are four ways you can run a Help macro.

Startup Macros

A Startup macro is run whenever the user loads the help file. Examples of Startup macros include adding new buttons and menus, registering a function or functions in a Dynamic Link Library (DLL) and playing sound. The settings for Startup macros are stored in the [Config] section of the Help Project File (HPJ File).

Help Topic Macros

You can create Windows Help macros that start whenever the user enters a certain topic. This is useful for customizing topics with buttons, menu items, and markers. For example, you may want certain buttons and menu items to be available only when a certain topic is displayed. Or perhaps you want to play a particular sound when displaying a topic.

Hotspot Macros

Hotspot macros look like jump text, but when you click on them they execute Help macros. Examples of Hotspot macros are text that when clicked runs another Windows application or prints the help topic.

Window Macros

Window macros are associated with the windows defined in the Project Editor. They execute when a window is activated. You might, for example, want to play a warning sound when an error message window is displayed. Window macros are added in the Macros tab of the Window Settings dialog box.