Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Using an .odc File to Mailmerge with SQL Server
Hi,
I'm using an .odc file to pull data from SQL Server 2000 into a Word 2003 mailmerge. My problem is getting the syntax correct so that I can dynamically create sql statements to use for the merge. For example, this works: Word.MailMerge.OpenDataSource Name:="c:\mailmerge\CustomerData.odc", SQLStatement:="SELECT * FROM [vwCustomerData]" This, however, does not: Word.MailMerge.OpenDataSource Name:="c:\mailmerge\vwCustomerData.odc", SQLStatement:="SELECT * FROM [vwCustomerData] WHERE State = 'CT'" I can't seem to find more than a couple examples on how to use an .odc in this way and I can find none that use a sql statement any more complicated than the first example above. Any help or advice would be very much appreciated. Thanks! Adam |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
mail merg file list | Mailmerge | |||
mailmerge - excel datasource - other file extension? | Mailmerge | |||
mailmerge from excelfile with different file extension | Mailmerge | |||
MailMerge with Access File - need to format currency | Mailmerge | |||
Mailmerge Recipients doesn't work with SQL Server | Mailmerge |