Message-ID: <242934424.10419.1711724471698.JavaMail.web05$@web05> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_10418_337463393.1711724471698" ------=_Part_10418_337463393.1711724471698 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
Sets the MailMerge's data source to a SharePoint View. A MailMerge by de= fault treats the page content as a repeat block, repeating the page content= 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 row= of data should be inserted instead of the current row at the next occurenc= e of the merge fields.
=20public void SetMailMerge(this WordTemplate template, Microsoft.SharePoint.S= PView view, Microsoft.SharePoint.SPList list)=20
Public Sub SetMailMerge(ByVal template As WordTemplate, ByVal view As Micro= soft.SharePoint.SPView, ByVal list As Microsoft.SharePoint.SPList)=20
null
(C#) or=20
Nothing
(VB.NET) is passed to the method.=20
You can call SetMailMerge once for each instance of WordTemplate. If you are using the Exce= l 2003 binary template file type (.xls/.xlt), you can call SetMailMerge or = SetRepeatBlock, but not both.
=20Additionally, only the page content is repeated for each row, not the en= tire page itself. If you wish to have the page itself repeat for each row, = you will need to remember to place a page break at the bottom of the page.<= /p>=20
Merge Fields for using the SetMailMerge method must not specify a data s= ource =E2=80=93 the data source is implied, and using a data source name wi= ll cause WordTemplate to throw an error. Valid merge field formats for use = with SetDataSource include field names («fieldname») and field ordinals («#1»).
=20 =20 =20//--- Set the mail merge //--- The data source is the SharePoint View myView wt.SetMailMerge(myView, myList); wt.Process();=20
'--- Set the mail merge '--- The data source is the SharePoint View myView wt.SetMailMerge(myView, myList) wt.Process()=20