Message-ID: <1625785331.9295.1711687258004.JavaMail.web05$@web05> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_9294_1923721788.1711687258004" ------=_Part_9294_1923721788.1711687258004 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html WordTemplate.MergeFieldsToIgnore

WordTemplate.MergeFieldsToIgnore

Introduced= in build 8.7

=20

Description

Sets a list of mergefields to be ignored during processing.=20
C#
=20
<p> public void MergeFieldsToIgnore(strin=
g [] mergefields)</p>
=20
=20
vb.net
=20
<p>Public Sub MergeFieldsToIgnore(mergefie=
lds as string())</p>
=20

Parameters

=20
mergefields
An= array of strings containing the names of all the mergefields to be ignored= .

Exceptions

=20
NullArgum= entException
=20 MergeFieldsToIgnore will throw this exception if=20 mergefields is null.=20

Remarks

=20 This feature is available in OOXML files (DOCX/DOCM) only.
The MergeField name must match exactly, including case and options.= =20

Examples

=20
C#
=20
WordTemplate wt =3D new WordTemplate();
wt.Open(@"c:\templates\Template.docx");
string [] mergefields =3D {"DataSet1.MergeField1", "MergeFie=
ld2(image)"};
wt.MergeFieldsToIgnore(mergefields);
wt.Process();
wt.Save(@"c:\reports\Report.docx");
=20
vb.net
=20
Dim wt As New WordTemplate()
wt.Open("c:\templates\Template.docx")
Dim mergefields =3D New String() {"DataSet1.MergeField1", "M=
ergeField2(image)"};
wt.MergeFieldsToIgnore(mergefields);
wt.Process()
wt.Save("c:\reports\Report.docx")
=20
------=_Part_9294_1923721788.1711687258004--