I'd like in VB.Net to merge a datasource from SQL Server to Word. Reading instructions in msdn kb, I have to use SubType as the following instruction :
.OpenDataSource(Name:="", Connection:=sCon, SQLStatement:=sSql, SubType:=wdMergeSubTypeWord2000)
VB doesn't recognise the value wdMergeSubTypeWord2000 and I didn't find anywhere help on SubType.
In other case, I can send a request and get a DataTable. I'd like to write something like that :
Word.MailMerge.DataSource = objDataTable
But VB tel me that Word.MailMerge.DataSource is ReadOnly. Someone has an idea ?
Thank you for any help.
.OpenDataSource(Name:="", Connection:=sCon, SQLStatement:=sSql, SubType:=wdMergeSubTypeWord2000)
VB doesn't recognise the value wdMergeSubTypeWord2000 and I didn't find anywhere help on SubType.
In other case, I can send a request and get a DataTable. I'd like to write something like that :
Word.MailMerge.DataSource = objDataTable
But VB tel me that Word.MailMerge.DataSource is ReadOnly. Someone has an idea ?
Thank you for any help.