Property: path to mail merge source

M

Monika Krug

Is there a Word document property or something like that
which stores the path to the current mail merge source (if
there is one)?

Where could I search to find out such an information? I
tried Word help, but if this information is in there at
all, I did not use the right search terms.

TIA,
Monika.
 
D

Doug Robbins

Use a macro containing the following command

If ActiveDocument.MailMerge.DataSource.Name <> "" Then
MsgBox ActiveDocument.MailMerge.DataSource.Name
Else
MsgBox "No data source attached to the active document."
End If

--
Please respond to the Newsgroup for the benefit of others who may be
interested. Questions sent directly to me will only be answered on a paid
consulting basis.

Hope this helps,
Doug Robbins - Word MVP
 
P

Peter Jamieson

For file data sources,

ActiveDocument.MailMerge.DataSource.Name

is probably the property you need. If for example you are accessing an SQL
Server database, where the ConnectString property may be more useful, and
the file property may in some cases point to a .odc which just contains some
information about the data source.

In Word 2002 you may have difficulty getting the values of some of these
properties as accessing them may cause Word to crash.

Peter Jamieson
 
C

Cindy M -WordMVP-

Hi Monika,
Is there a Word document property or something like that
which stores the path to the current mail merge source (if
there is one)?

Where could I search to find out such an information?
With Word 2002/2003, the quickest way is to go over
Help/"About"/System Info, then drill down to the mail merge
information for Word.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun
8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow
question or reply in the newsgroup and not by e-mail :)
 

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