Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mail Merge DataSource SQL

Status
Not open for further replies.

robvi

Programmer
Aug 16, 2002
11
FR
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top