How can I find the data-source of mail merge document?

P

Phillip

I have a folder containing over a hundred MS Word mailmerge documents.
The data for each document apears to be a different Access Database Query.
I'd like to know If I can identify the qury record source from the Word
Document?
 
D

Doug Robbins - Word MVP

The VBA command

ActiveDocument.MailMerge.DataSource.Name

returns the name of the data source that is attached to a mail merge main
document.

It would be possible to write a macro that went through all of the documents
in a folder and inserted the name of the document and of its attached data
source into a table in a new document.

The procedure would be a modification of the code in the article "Find &
ReplaceAll on a batch of documents in the same folder" at:

http://www.word.mvps.org/FAQs/MacrosVBA/BatchFR.htm

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top