ApplyDynamicTemplate Method
Applies a Dynamic Web Template to a document.
expression.ApplyDynamicTemplate(bzMaster, pState, )
expression Required. An expression that returns a WebFile object.
bzMaster Required String. The path and filename for the Dynamic Web Template.
pState 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 bzMaster parameter set to an empty string.
Example
The following example applies the specified Dynamic Web Template file to the specified file.
Dim objState As DynamicTemplateState
Dim objFile As WebFile
Set objState = Application.CreateDynamicTemplateState
Set objFile = ActiveWeb.LocateFile("home.htm")
objFile.ApplyDynamicTemplate "template.dwt", objState