applyDynamicTemplate Method

Microsoft FrontPage Visual Basic

applyDynamicTemplate Method

Applies a Dynamic Web Template to document.

expression.applyDynamicTemplate(urlMaster, state)

expression    Required. An expression that returns one of the objects in the Applies To list.

urlMaster    Required String. The path and file name for the Dynamic Web Template.

state    Required DynamicTemplateState. Specifies the region mapping for the Dynamic Web Template. Use the SetHeadMapping and SetBodyMapping methods of the DynamicTemplateState object to customize region mapping.

Remarks

To detach a Dynamic Web Template, use the ApplyDynamicTemplate method with the urlMaster parameter set to an empty string.

Example

The following example applies the specified Dynamic Web Template to the active document.

    Dim objState As DynamicTemplateState

Set objState = Application.CreateDynamicTemplateState

ActiveDocument.ApplyDynamicTemplate "template.dwt", objState