D
DevDiscuss
I'm researching integrating with Word's mail-merge functionality. I'm
wondering if it is possible to provide the Word object model with a custom
implementation of the MailMergeDataSource interface? Here's what I'm trying
to do from a high level:
1. The user opens Word to create a document template. The user would be
able to insert merge fields using my custom datasource. Ideally, I would
have an Office plugin which would communicate to my application to retrieve
metadata regarding the datasource, etc. Templates would then be persisted
to the database of my application for later use.
2. From within my application, using the Word automation API, I instantiate
Word and load the saved template from step #1. Here I'd set the datasource
to my custom implementation, then execute the Merge.
I would like to avoid recreating the functionality from scratch, and
leverage what is already there in order to have my datasource play nicely
with Word's advanced merge features. I've noticed that the Office Interop
libraries define interfaces for relevant portions of MailMergeDataSource, so
I'm wondering if it is possible to implement these directly or if anyone has
done so?
Thanks
wondering if it is possible to provide the Word object model with a custom
implementation of the MailMergeDataSource interface? Here's what I'm trying
to do from a high level:
1. The user opens Word to create a document template. The user would be
able to insert merge fields using my custom datasource. Ideally, I would
have an Office plugin which would communicate to my application to retrieve
metadata regarding the datasource, etc. Templates would then be persisted
to the database of my application for later use.
2. From within my application, using the Word automation API, I instantiate
Word and load the saved template from step #1. Here I'd set the datasource
to my custom implementation, then execute the Merge.
I would like to avoid recreating the functionality from scratch, and
leverage what is already there in order to have my datasource play nicely
with Word's advanced merge features. I've noticed that the Office Interop
libraries define interfaces for relevant portions of MailMergeDataSource, so
I'm wondering if it is possible to implement these directly or if anyone has
done so?
Thanks