Excel datasource

M

mdthomann

I would like to add the path and filename of my datasource for an email
merge. The merge itself works great.

But to help me keep track of data, I would like to add the path and
filename of the datasource.

Similiar to FILENAME \p but for datasource.

Thanks
 
D

Doug Robbins - Word MVP

Use the following macro to insert the datasource with it's path at the
location of the selection:

With ActiveDocument
If .MailMerge.State = wdMainAndDataSource Then
Selection.InsertBefore .MailMerge.DataSource.Name
End If
End With


--
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