SetBodyMapping Method

Microsoft FrontPage Visual Basic

SetBodyMapping Method

Specifies the mapping that is applied to regions that are in the body section of a Dynamic Web Template.

expression.SetBodyMapping(bzOldMaster, bzNewMaster, bzOldRegion, bzNewRegion)

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

bzOldMaster    Required String. The relative path and filename of the old Dynamic Web Template file. Use an empty String if there is currently no attached to the document.

bzNewMaster    Required String. The relative path and filename of the new Dynamic Web Template file.

bzOldRegion    Required String. The region name in the old Dynamic Web Template file from which to map. Use an empty String to indicate the entire BODY element.

bzNewRegion    Required String. The region name in the new Dynamic Web Template file to which to map the old region.

Example

The following example maps the regions from the body and head sections of the document, and then attaches the Dynamic Web Template file.

    Dim objState As DynamicTemplateState

Set objState = Application.CreateDynamicTemplateState

objState.SetBodyMapping "", "template.dwt", "", "A1"
objState.SetHeadMapping "", "template.dwt", "", "metadata"

ActiveDocument.ApplyDynamicTemplate "template.dwt", objState