Introduced in build 126.96.36.1999
Sets the MailMerge's data source to a SharePoint View. A MailMerge by default 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 occurence of the merge fields.
templateCurrent WordTemplate that is calling SetMailMerge
viewA SharePoint View to use as a data source.
listA SharePoint List to which the view applies
ArgumentNullExceptionSave will throw this exception if
Nothing(VB.NET) is passed to the method.
Additionally, only the page content is repeated for each row, not the entire 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.
Merge Fields for using the SetMailMerge method must not specify a data source – the data source is implied, and using a data source name will cause WordTemplate to throw an error. Valid merge field formats for use with SetDataSource include field names («fieldname») and field ordinals («#1»).