views:

50

answers:

0

I am trying to automate a mailmerge to print mailing labels with C#. I've created a Word template containing the label layout, but when I try to use interop to set the DataSource I am having issues.

There are 2 ways I can go about this, either through accessing a SQL table or importing from an Excel spreadsheet. I've had mixed luck in connection to the data sources, but even when I manage it the fields do not appear to be imported properly (Only one or two columns of the row named like "m_" and "m_1") and they don't want to bind to the fields that are placed on the labels.

I've also tried creating a macro in word to bind to the data source, but when the macro is executed it's exhibiting the same behavior as I am seeing with Interop.

Has anyone else tried this and gotten it to work? Any suggestions would be greatly appreciated!

Thanks!