Mailmerge data file name

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Anyone know how to display the name of the data source file in a mailmerge
..doc file. Can you also display the path to that datasource?

Thanks for any ideas on this,
Mark
 
The only way I've found to do this (and it's not really very helpful) is to
add the Edit Data Source button to the Mail Merge toolbar. When you click on
this button, you get a warning that editing the data source will break the
link to it, but the message does at least tell you the filename of the data
source (just the name, not the full path). You can then cancel out of the
dialog.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
You could use this very short subroutine to type the datasource (full path
and file name) at the insertion point.

Sub TypeDataSource()
Selection.TypeText ThisDocument.MailMerge.DataSource.Name
End Sub


If you just want a message box to show you the path and file name, you could
change the sub to

Sub RevealDataSource()
MsgBox ThisDocument.MailMerge.DataSource.Name
End Sub


Steve Yandl
 
I was a bit too quick in my post above. You're most likely to store the
subroutine in a template or add-in so "ThisDocument" should be replaced with
"ActiveDocument" to get results.

Sub TypeDataSource()
Selection.TypeText ActiveDocument.MailMerge.DataSource.Name
End Sub

or

Sub RevealDataSource()
MsgBox ActiveDocument.MailMerge.DataSource.Name
End Sub

Steve Yandl
 

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

Similar Threads

Word 07 mailmerge 1
Path for datasource 9
Data source not "sticking" 14
Mailmerge 1
Multiple field lines in Excel 2002 mailmerge 1
MailMerge Query 1
Mergefield Query 1
Word 2003 - Mailmerge 2

Back
Top