Hi,
I am trying to mail merge into a table using the regions tags
(TableStart:Table TableEnd:Table)
Is there a way of making the rows append as columns…i.e
Instead of
Name
John
Alex
I would like to see
Name John Alex
The code i am using is…
Dim _dtInvestors As New DataTable
_dtInvestors.TableName = "SMAContactDetail"
Dim _dc As New DataColumn("title", System.Type.GetType("System.String"))
Dim _dc1 As New DataColumn("given_names", System.Type.GetType("System.String"))
Dim _dc2 As New DataColumn("surname", System.Type.GetType("System.String"))
Dim _dc3 As New DataColumn("date_of_birth", System.Type.GetType("System.String"))
_dtInvestors.Columns.Add(_dc)
_dtInvestors.Columns.Add(_dc1)
_dtInvestors.Columns.Add(_dc2)
_dtInvestors.Columns.Add(_dc3)
_dtRow = _dtInvestors.NewRow
_dtrow("title") = "Mr"
_dtrow("given_names") = "John"
_dtrow("surname") = "John"
_dtrow("date_of_birth") = "01/01/1955"
_dtInvestors.Rows.Add(_dtrow)
_dtRow = _dtInvestors.NewRow
_dtrow("title") = "Mr"
_dtrow("given_names") = "Alex"
_dtrow("surname") = "Alex"
_dtrow("date_of_birth") = "01/01/1965"
_dtInvestors.Rows.Add(_dtrow)
Dim dataSet As DataSet = New DataSet()
dataSet.Tables.Add(_dtInvestors)
_doc = New Document(System.IO.Path.Combine(_path, _sourceDocumentName))
_doc.MailMerge.ExecuteWithRegions(dataSet)
_doc.Save("c:\done.doc", SaveFormat.FormatDocument)
I have attached a copy of a simple test file, can you show me in there if it is possible?
Many Thanks,
Connor