|
WordWriter in ASP
> ASP Reference
> Process Method
Syntax:
[VBScript]
Sub Process()
Object:
Description:
The Process method enters data source values in a template's
merge fields, and creates an image of the output file (the new document) in memory.
The save method can then save the output file to disk, stream it to the browser, or both.
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 2006 © SoftArtisans, Inc. All Rights Reserved.
|