Export.XHTML.TemplateCount

Description

The number of XHTML export templates associated with a DataWindow object.

Applies to

DataWindow objects

Syntax

Describe argument:

"DataWindow.Export.XHTML.TemplateCount"

Usage

This property is used to get a count of the XHTML export templates associated with a DataWindow object. It returns a long specifying the number of XHTML export templates previously saved in the DataWindow painter for the specified DataWindow object. The count is used with the DataWindow.Export.XHTML.Template[ ].Name property to enable an application to select an export template at runtime.

Examples

Example 1

The TemplateCount property gets the number of templates associated with a DataWindow object. You can use this number as the upper limit in a FOR loop that populates a drop-down list with the template names. The FOR loop uses the Template[ ].Name property.

Dim count As String
Dim templateName As String
Dim i As Long

count=wdw.Describe  _
   ("DataWindow.Export.XHTML.TemplateCount")

for i=1 to CLng(count)
  templateName = wdw.Describe  _
      ("DataWindow.Export.XHTML.Template[" _
         + Cstr(i) + "].Name")
  DDL1.Items.Add(New ListItem(templateName))
next

Before generating the XHTML, set the export template using the value in the drop-down list box:

wdw.SetProperty  _
   ("DataWindow.Export.XHTML.UseTemplate", _
     DDL1.SelectedValue())

See also