ASP Programmer's Reference
WordTemplate.Process Method |
 |
Syntax:
Sub WordTemplate.Process
Description:
The Process method enters data source values in a template's
merge fields. Call Process after SetDataSource
and before Save.
You can call Process more than once for a single instance of
WordTemplate. This allows you to generate multiple
files from a single template and an updated data source.
Example:
[VB]
arrValues = Array("SoftArtisans", "WordWriter", "http://www.softartisans.com")
arrNames = Array("CompanyName", "ProductName", "URL")
Set oWW = Server.CreateObject("SoftArtisans.WordTemplate")
oWW.Open(Server.MapPath("./Template.doc"))
oWW.SetDataSource arrValues, arrNames
'--- Call WordTemplate.Process to populate the
'--- template with the new data.
oWW.Process
oWW.Save Response, "Output.doc", False
Set oWW = Nothing
Top
Copyright © 2003, SoftArtisans, Inc.