Omni Systems, Inc. |  | Mif2Go User's Guide, Version 55 |  |  |  |  |

> 28 Working with macros > 28.9 Deploying macros and macro variables > 28.9.2 Invoking macros at predetermined points in output

### 28.9.2 Invoking macros at predetermined points in output

You can specify macros to be invoked at several predetermined points in HTML or RTF output, by assigning the macros to keywords. Locations for macro insertion depend on the type of output:

HTML macro insertion points

RTF macro insertion points for Word

RTF macro insertion points for WinHelp

HTML macro insertion points

To insert macros in HTML output:

[Inserts]

; location = macro to insert, can call another macro

; TopicBreak is placed between topics when files are not split

; Entities is placed before the head element

; Head is placed after the title element within the head element

; Frames is placed between the head and body (for Framesets)

; Top is placed at the beginning of the body element

; Bottom is placed just before the ending of the body

; End is placed after the ending of the body (to close noframes)

For split and extract files, you can use variants of the [Inserts] keywords to restrict the types of files to which an inserted macro should apply; see §18.5.2 Assigning code to [Inserts] keywords for splits and extracts.

For example:

[Inserts]

Top=<$EscapeFrameset>

[EscapeFrameset]

<SCRIPT LANGUAGE="JavaScript">

<!-- Begin

if (self.top.frames.length != 0)

self.top.location=self.location;

// End -->

</SCRIPT>

<a target="_top"></a>

RTF macro insertion points for Word

To insert macros (or other content) in RTF output for Word:

[Inserts]

; location = content to insert, which may be a Mif2Go macro

; Top, Bottom

; Header, Footer

; FirstHeader, FirstFooter

; LeftHeader, LeftFooter

; RightHeader, RightFooter

RTF macro insertion points for WinHelp

To insert macros (or other content) in RTF output for WinHelp:

[Inserts]

; location = content to insert, which may be a macro

; TopicStart, TopicEnd

; SlideStart, SlideEnd

> 28 Working with macros > 28.9 Deploying macros and macro variables > 28.9.2 Invoking macros at predetermined points in output

| Mif2Go User's Guide: 28.9.1 Understanding where to use macros and macro variables |  | Mif2Go User's Guide: 28.9.3 Surrounding or replacing text with code or macros |