NetOfficeFw / NetOffice

🌌 Create add-ins and automation code for Microsoft Office applications.
MIT License
697 stars 143 forks source link

Document.MailMerge.OpenDataSource open without selected table menu #87

Closed netoffice-bot closed 6 years ago

netoffice-bot commented 10 years ago

Issue by rtverd Tue, 03 Dec 2013 10:32:07 GMT Originally opened as https://netoffice.codeplex.com/workitem/20484


When I open the datasource always opens a window which lets me choose the existing Tables. But I need open documen automaticaly without selected table menu. How to do it?

object sqlStatement = string.Format("SELECT * FROM {0}", DataSourceTableName); doc.MailMerge.OpenDataSource(dataSourceFile.GetOSFullPath(),sqlStatement );

netoffice-bot commented 10 years ago

Comment by Wed, 04 Dec 2013 16:30:27 GMT


I've already found the solution:doc.MailMerge.OpenDataSource(dataSourceFile.GetOSFullPath(), null, null, null, null, null, null, null, null, null, null, null, sqlStatement, null, null, null);

Sorry for a trouble