Example |
---|
Code Block |
---|
| csharp | csharp |
title | C# |
---|
{signature}
{remarks}The key contains information about WordWriter, including product name, platform, and version. Only the 23\-character key is stored in the registry. To determine which licensed version is currently installed on the server, run LicenseManager.exe \(in OfficeWriter\WordWriter\) and enter the license key retrieved by the [LicenseKey|WordTemplate.LicenseKey] property.
{remarks}
{example}{code:csharp|title=C#}
WordTemplate WordTempl = new WordTemplate();
WordTempl.Open(Page.MapPath("./BasicTemplate.doc"));
string key = WordTempl.LicenseKey;
string[] NamesArr = {"LicenseKey", "DateTime"};
object[] ValuesArr = {key, DateTime.Now};
WordTempl.SetDataSource(ValuesArr, NamesArr);
WordTempl.Process();
WordTempl.Save(Page.Response, "BasicGenerated.doc", false);
Code Block |
---|
{code}
{code:vb.net
vb.net | title | |title=vb.net
}
Dim WordTempl As New WordTemplate()
WordTempl.Open(Page.MapPath("./BasicTemplate.doc"))
Dim key As String = WordTempl.LicenseKey
Dim NamesArr As String() = {"LicenseKey", "DateTime"}
Dim ValuesArr As Object() = {key, DateTime.Now}
WordTempl.SetDataSource(ValuesArr, NamesArr)
WordTempl.Process()
WordTempl.Save(Page.Response, "BasicGenerated.doc", False)
{code}
{example}