You are here: Tips and Techniques for Word > Using WinHelp Macros in Word > Sample WinHelp Macro Uses > Launching an Application with Hotspot Macros

Launching an Application with Hotspot Macros

This procedure turns any text you choose into a hotspot that will open any application located in your Windows registry. In the following example, when the hotspot is clicked, Windows Notepad opens.

1.   Open the Word source document that will contain the hotspot.

2.   Select the text for the hotspot and click the Insert Help Macro button .

The Edit Windows Help Macro dialog opens.

3.   From the drop-down list box in the Macro executed from text area, select ExecFile.

4.   Type Notepad.exe in the textbox at the top of the ExecFile Arguments area and click the checkmark button.

5.   Select the display-state box, and from the drop-down at the top of the ExecFile Arguments area, select the value, 5 – SW_SHOW. Display-state determines how the application appears when it is started. In this case you want the Notepad.exe to open as it normally would when the hotspot is clicked.

Your dialog should look like the example below.

6.   Click OK to insert the Macro Comment into your source document.

7.   Close the source document and build your WinHelp file.

8.   Open your WinHelp file and click the hotspot to test the macro.

Alternatively, you can perform the same steps with the Insert|ComponentOne Doc-To-Help|Help Macro menu command.