ASP Programmer's Reference
WordTemplate.Open Method |
 |
Syntax:
Sub WordTemplate.Open(templateFileName As String)
Description:
Opens the WordWriter template specified by the templateFileName
parameter. A WordWriter template is a file created in Microsoft Word that contains
merge fields.
WordWriter supports Microsoft Word 97, 2000, and 2002 (XP). Do not
use Open to open files created in earlier versions of
Microsoft Word.
Parameters:
- templateFileName
The complete path and file name of the template Word file.
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
oWW.Process
oWW.Save Response, "Output.doc", False
Set oWW = Nothing
Top
Copyright © 2003, SoftArtisans, Inc.