Imports the data from a SharePoint View into a Table at the point of the current element in the document. Also accepts a SharePoint List to which the View belongs and a DataImportProperties object with the import options.

public static Table ImportData(this Element element, Microsoft.SharePoint.SPView view, Microsoft.SharePoint.SPList list, DataImportProperties props)
Public Shared Function ImportData(ByVal element As Element, ByVal view As Microsoft.SharePoint.SPView, ByVal list As Microsoft.SharePoint.SPList, ByVal props As DataImportProperties) As Table

The current element which is calling ImportData

The SharePoint View to be used as a data source

SharePoint List to which the View belongs

Import properties for this data import, including max rows, max columns, column filter, etc.

The Table into which the data is being imported

This is an extension method for the Element object to be used for binding SharePoint data to documents from within SharePoint. To use this method, you must add a reference to SoftArtisans.OfficeWriter.WordWriter.SharePointIntegration.dll

Table tbl = e.ImportData(myView, myList, importProps);
Dim tbl As Table = e.ImportData(myView, myList, importProps)