Message-ID: <1748811847.9549.1711694248477.JavaMail.web05$@web05> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_9548_672829786.1711694248477" ------=_Part_9548_672829786.1711694248477 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
The WordTemplate object represents a WordWriter template. A WordWriter t= emplate is a file created in Microsoft Word that contains merge fields.
= =20public sealed class WordTemplate=20
Public NotInheritable Class WordTemplate=20
WordTemplate
object is in the SoftArtisans.OfficeWriter.WordWr=
iter namespace. The object can be referenced as=20
SoftArtisans.WordWriter.WordTemplate
. To minimize typing and e=
rrors, import the namespace to the aspx page, and reference the object as=
=20
WordTemplate
, without the namespace prefix.=20
If you are coding directly in the .aspx page, following the Page directi= ve, include:
=20<%@ Import Namespace=3D"SoftArtisans.OfficeWriter.WordWriter" = %>=20
If you are coding in the "code behind" page (.aspx.vb or .aspx=
.cs), include an Imports
or using
statement at th=
e top of the "code behind" page:
using SoftArtisans.OfficeWriter.WordWriter;=20
Imports SoftArtisans.OfficeWriter.WordWriter=20
To create an instance of the WordTemplate object use:
=20WordTemplate wt =3D new WordTemplate();=20
Dim wt As New WordTemplate()=20
=20 | Used by SetDataSource to indicate that as much of the data sour= ce should be imported as possible. | =20
Name | =20
Description | =20
---|---|
=20 | Returns the names of all bookmarks in a WordWri= ter template. | =20
=20 | Sets or returns the content-type header that wi= ll be sent to the browser with the generated Word document. | =20
=20 | The CultureInfo property allows you to override the server's default=
locale when generating a new Word file. For example, to generate a US Engl=
ish document on a French operating system, you could use CultureInfo<=
/code> to set the Word file's Syst=
em.Globalization.CultureInfo to US English. | =20
=20 | Use DataSourceSeparator to set the character that separates = a data source name from a column name in a data marker. '.' is the default = data source separator. | =20
=20 | Gets or sets whether NEXT fields should be enab= led in the WordTemplate. If NEXT fields are enabled, the data source will m= ove to the next row of data when merge field is repeated in the template fi= le. | =20
=20 | Returns the names of all merge fields in the ma= in document. | =20
=20 | Sets or returns the registered 23-character lic= ense key that enables WordWriter. | =20
=20 | Gets or sets whether merge fields and next fiel= ds should be preserved after processing the WordTemplate. | =20
=20 | The extension that should be used when savin= g this template; based on the input file. | =20
=20 | Gets or sets whether IF fields will be unlinked= from the document after they are evaluated. | =20
=20 | Gets or sets whether IF fields should be evalua= ted server-side in the WordTemplate. | =20
=20 | Returns the exact version of WordWriter. | = =20
Name | =20
Description | =20
---|---|
=20 | Returns the names of all merge fields in the sp= ecified bookmark. | =20
=20 | Opens the WordWriter template specified by the =
templateFileName parameter. | =20
=20 | Opens a WordWriter template from a System.IO.Stream. A WordWriter templa= te is a file created in Microsoft Word that contains merge fields. | =20
=20 | Passes a document from WordApplication to WordTemplate. | =20
=20 | 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 memor= y. | =20
=20 | Saves the generated Word file on the server. = td>=20 |
=20 | Sends the generated Word binary file to the spe=
cified System.IO.Stream o=
r, a class derived from System.IO.Stream (for example, System.IO.FileStream). | =20
=20 | If you pass Save an HttpResponse= tt> object object, WordWriter will stream the generated file to the cli= ent. If the user chooses to open (rather than save) the file, it will open = in the browser window. | =20
=20 | If you pass save an HttpServletRes=
ponse object, WordWriter will stream the generated file to the client. This=
method allows you to specify a default client-side file name, and whether =
the file should be opened in the browser window or in Microsoft Word. | =
=20
=20 | Sets a main document data source to a one-dimen= sional object array. The method imports a single row of data to the specifi= ed set of main document merge fields. | =20
=20 | Sets a main document data source to a one-dimen= sional object array. The method imports a single row of data to the specifi= ed set of main document merge fields. | =20
=20 | Sets a main document data source to an ADO.NET = DataSet. A DataSet contains a collection of DataTables. If you set a main d= ocument data source to a DataSet, WordWriter will get the first row of the = first DataTable in the DataSet. | =20
=20 | Sets a template's data source to an ADO.NET Dat= aSet. A DataSet contains a collection of DataTables. If you set a template'= s data source to a DataSet, WordWriter will get the first row of the first = DataTable in the DataSet. | =20
=20 | Sets a main document data source to an ADO.NET = DataTable. If the specified DataTable contains more than one row, WordWrite= r will use the first row as the data source. | =20
=20 | Sets a template's data source to an ADO.NET Dat= aTable. If the specified DataTable contains more than one row, WordWriter w= ill use the first row as the data source. | =20
=20 | Sets a main document data source to an an IData= Reader interface, which may be either a SqlDataReader, OleDbDataReader, or = an AdomdDataReader. If the specified DataReader returns more than one row, = WordWriter will use the first row as the data source. | =20
=20 | Sets a template's data source to an an IDataRea= der interface, which may be either a SqlDataReader, OleDbDataReader or an A= domdDataReader. If the specified DataReader returns more than one row, Word= Writer will use the first row as the data source. | =20
=20 | Sets the data source for the specified main doc= ument merge field to an object. The main document is the p= art of the document that is not within a repeat block. | =20
=20 | Sets an | =20
SetDataSource(System.Collections.IEnumerator, String(), String) = | =20
Sets an | =20
=20 | Sets a template's main document data source to =
an IDictionary collection=
. An IDictionary represents a collection of key-and-value pair=
s. | =20
= =20 | Sets a template's main document data source to =
an IDictionary collection=
. An IDictionary represents a collection of key-and-value pair=
s. | =20
=20 | Sets an | =20
SetDataSource(System.Collections.ICollection, String(), String) = | =20
Sets an | =20
=20 | Sets the MailMerge's data source to a two-dimen= sional (rectangular) array of objects. A MailMerge by default treats the pa= ge content as a repeat block, repeating the page content for each row unles= s NEXT fields are used. If the WordTemplate.EnableNEXTFields property is set to true, the N= EXT field can also be used to indicate that the next row of data should be = inserted instead of the current row at the next occurence of the merge fiel= ds. This should largely imitate the behavior of a Microsoft Word Mail merge= . | =20
=20 | Sets the MailMerge's data source to a two-dimen= sional (rectangular) array of objects. A MailMerge by default treats the pa= ge content as a repeat block, repeating the page content for each row unles= s NEXT fields are used. If the WordTemplate.EnableNEXTFields property is set to true, the N= EXT field can also be used to indicate that the next row of data should be = inserted instead of the current row at the next occurence of the merge fiel= ds. This should largely imitate the behavior of a Microsoft Word Mail merge= . | =20
=20 | Sets the MailMerge's data source to a two-dimen= sional (rectangular) array of objects. A MailMerge by default treats the pa= ge content as a repeat block, repeating the page content for each row unles= s NEXT fields are used. If the WordTemplate.EnableNEXTFields property is set to true, the N= EXT field can also be used to indicate that the next row of data should be = inserted instead of the current row at the next occurence of the merge fiel= ds. This should largely imitate the behavior of a Microsoft Word Mail merge= . | =20
=20 | Sets the MailMerge's data source to a two-dimen= sional (rectangular) array of objects. A MailMerge by default treats the pa= ge content as a repeat block, repeating the page content for each row unles= s NEXT fields are used. If the WordTemplate.EnableNEXTFields property is set to true, the N= EXT field can also be used to indicate that the next row of data should be = inserted instead of the current row at the next occurence of the merge fiel= ds. This should largely imitate the behavior of a Microsoft Word Mail merge= . | =20
=20 | Sets the MailMerge's data source to a two-dimen= sional (rectangular) array of objects. A MailMerge by default treats the pa= ge content as a repeat block, repeating the page content for each row unles= s NEXT fields are used. If the WordTemplate.EnableNEXTFields property is set to true, the N= EXT field can also be used to indicate that the next row of data should be = inserted instead of the current row at the next occurence of the merge fiel= ds. This should largely imitate the behavior of a Microsoft Word Mail merge= . | =20
=20 | Sets the MailMerge's data source to a two-dimen= sional (rectangular) array of objects. A MailMerge by default treats the en= tire page as a repeat block, adding a new page when needed. A MailMerge by = default treats the page content as a repeat block, repeating the page conte= nt for each row unless NEXT fields are used. If the WordTemplate.EnableNEXTFields property = is set to true, the NEXT field can also be used to indicate that the next r= ow of data should be inserted instead of the current row at the next occure= nce of the merge fields. This should largely imitate the behavior of a Micr= osoft Word Mail merge. | =20
=20 | Sets the MailMerge's data source to a two-dimen= sional (rectangular) array of objects. A MailMerge by default treats the pa= ge content as a repeat block, repeating the page content for each row unles= s NEXT fields are used. If the WordTemplate.EnableNEXTFields property is set to true, the N= EXT field can also be used to indicate that the next row of data should be = inserted instead of the current row at the next occurence of the merge fiel= ds. This should largely imitate the behavior of a Microsoft Word Mail merge= . | =20
=20 | Sets the MailMerge's data source to a two-dimen= sional (rectangular) array of objects. A MailMerge by default treats the pa= ge content as a repeat block, repeating the page content for each row unles= s NEXT fields are used. If the WordTemplate.EnableNEXTFields property is set to true, the N= EXT field can also be used to indicate that the next row of data should be = inserted instead of the current row at the next occurence of the merge fiel= ds. | =20
=20 | Sets the MailMerge's data source to a two-dimen= sional (rectangular) array of objects. A MailMerge by default treats the pa= ge content as a repeat block, repeating the page content for each row unles= s NEXT fields are used. If the WordTemplate.EnableNEXTFields property is set to true, the N= EXT field can also be used to indicate that the next row of data should be = inserted instead of the current row at the next occurence of the merge fiel= ds. | =20
=20 | Sets the MailMerge's data source to a two-dimen= sional (rectangular) array of objects. A MailMerge by default treats the pa= ge content as a repeat block, repeating the page content for each row unles= s NEXT fields are used. If the WordTemplate.EnableNEXTFields property is set to true, the N= EXT field can also be used to indicate that the next row of data should be = inserted instead of the current row at the next occurence of the merge fiel= ds. | =20
=20 | Sets the MailMerge's data source to a DataTable= . A MailMerge by default treats the page content as a repeat block, repeati= ng the page content for each row unless NEXT fields are used. If the WordTemplate.EnableNEXTFie= lds property is set to true, the NEXT field can also be used to indicat= e that the next row of data should be inserted instead of the current row a= t the next occurence of the merge fields. | =20
=20 | Sets the MailMerge's data source to a two-dimen= sional (rectangular) array of objects. A MailMerge by default treats the pa= ge content as a repeat block, repeating the page content for each row unles= s NEXT fields are used. If the WordTemplate.EnableNEXTFields property is set to true, the N= EXT field can also be used to indicate that the next row of data should be = inserted instead of the current row at the next occurence of the merge fiel= ds. | =20
=20 | Sets the MailMerge's data source to a two-dimen= sional (rectangular) array of objects. A MailMerge by default treats the pa= ge content as a repeat block, repeating the page content for each row unles= s NEXT fields are used. If the WordTemplate.EnableNEXTFields property is set to true, the N= EXT field can also be used to indicate that the next row of data should be = inserted instead of the current row at the next occurence of the merge fiel= ds. | =20
=20 | Sets the specified repeat block's data source t= o an ADO.NET DataSet. A repeat block is a fragment in the template document= that will be repeated for each row in a data source. In the template docum= ent, repeat blocks are defined by Word bookmarks that contain merge fields.= | =20
=20 | Sets the specified repeat block's data source t= o an ADO.NET DataSet. | =20
=20 | Sets the specified repeat block's data source t= o an ADO.NET DataTable. | =20
= =20 | Sets the specified repeat block's data source t= o an ADO.NET DataTable. | =20
=20 | Sets the specified repeat block's data source t= o an IDataReader interface, which may be either a SqlDataReader, OleDbDataR= eader or an AdomdDataReader. | =20
= =20 | Sets the specified repeat block's data source t= o an IDataReader interface, which may be either a SqlDataReader, OleDbDataR= eader, or an AdomdDataReader. | =20
=20 | Sets the specified repeat block's data source t= o a 1-dimensional array of objects. | =20
=20 | Sets the specified repeat block's data source t= o a multidimensional (rectangular) array of objects. | =20
= | =20Sets the specified repeat block's data source t= o a multidimensional (rectangular) array of objects. | =20
=20 | Sets the specified repeat block's data source t= o a jagged array (array-of-arrays) of objects. | =20
SetRepeatBlock(Object()(), String(), String, Int32, Boolean) | =20
Sets the specified repeat block's data source t= o a jagged array (array-of-arrays) of objects. | =20
= =20 | Sets the specified repeat block's data source t= o an IEnumerator collecti= on. | =20
SetRepeatBlock(System.Collections.IEnumerator, String, String) <= /p> | =20
Sets the specified repeat block's data source t= o an IEnumerator collecti= on. | =20
= =20 | Sets the specified repeat block's data source t= o an ICollection. | = =20
SetRepeatBlock(System.Collections.ICollection, String, String) <= /p> | =20
Sets the specified repeat block's data source t= o an ICollection. | = =20
=20 | Creates a new WordTemplate object. | =20
Overload | =20
Description | =20
---|---|
=20 | Opens the WordWriter template specified by the <= code>templateFileName parameter. | =20
=20 | Opens the WordWriter template specified by the <= code>templateFileName parameter. | =20
Save(Microsoft.SharePoint.SPDocumentLibrary, String, Boolean) = | =20
Saves the generated Word file to a SharePoint Do= cument Library. | =20
=20 | Saves the generated Word file to a SharePoint Li= st Item. | =20
=20 | Sets a main document data source to a SharePoint= List. If the specified List contains more than one row, WordWriter will us= e the first row as the data source. | =20
=20 | Sets a main document data source to a SharePoint= List. If the specified List contains more than one row, WordWriter will us= e the first row as the data source. | =20
SetDataSource(Microsoft.SharePoint.SPView, Microsoft.SharePoint.SPLis= t, String) | =20
Sets a main document data source to a SharePoint= View. If the specified View contains more than one row, WordWriter will us= e the first row as the data source. | =20
SetDataSource(Microsoft.SharePoint.SPView, Microsoft.SharePoint.SPLis= t) | =20
Sets a main document data source to a SharePoint= View. If the specified View contains more than one row, WordWriter will us= e the first row as the data source. | =20
=20 | Sets the MailMerge's data source to a SharePoint= View. A MailMerge by default treats the page content as a repeat block, re= peating the page content for each row unless NEXT fields are used. If the <= a href=3D"/display/WW8/WordTemplate.EnableNEXTFields">WordTemplate.EnableNE= XTFields property is set to true, the NEXT field can also be used to in= dicate that the next row of data should be inserted instead of the current = row at the next occurence of the merge fields. | =20
=20 | Sets the MailMerge's data source to a SharePoint= View. A MailMerge by default treats the page content as a repeat block, re= peating the page content for each row unless NEXT fields are used. If the <= a href=3D"/display/WW8/WordTemplate.EnableNEXTFields">WordTemplate.EnableNE= XTFields property is set to true, the NEXT field can also be used to in= dicate that the next row of data should be inserted instead of the current = row at the next occurence of the merge fields. | =20
SetMailMerge(Microsoft.SharePoint.SPView, Microsoft.SharePoint.SPList= , Int32) | =20
Sets the MailMerge's data source to a SharePoint= View. A MailMerge by default treats the page content as a repeat block, re= peating the page content for each row unless NEXT fields are used. If the <= a href=3D"/display/WW8/WordTemplate.EnableNEXTFields">WordTemplate.EnableNE= XTFields property is set to true, the NEXT field can also be used to in= dicate that the next row of data should be inserted instead of the current = row at the next occurence of the merge fields. | =20
SetMailMerge(Microsoft.SharePoint.SPView, Microsoft.SharePoint.SPList= ) | =20
Sets the MailMerge's data source to a SharePoint= View. A MailMerge by default treats the page content as a repeat block, re= peating the page content for each row unless NEXT fields are used. If the <= a href=3D"/display/WW8/WordTemplate.EnableNEXTFields">WordTemplate.EnableNE= XTFields property is set to true, the NEXT field can also be used to in= dicate that the next row of data should be inserted instead of the current = row at the next occurence of the merge fields. | =20
=20 | Sets the specified repeat block's data source to= a SharePoint List. | =20
=20 | Sets the specified repeat block's data source to= a SharePoint List. | =20
SetRepeatBlock(Microsoft.SharePoint.SPView, Microsoft.SharePoint.SPLi= st, String, Int32) | =20
Sets the specified repeat block's data source to= a SharePoint View. | =20
SetRepeatBlock(Microsoft.SharePoint.SPView, Microsoft.SharePoint.SPLi= st, String) | =20
Sets the specified repeat block's data source to= a SharePoint View. | =20