Determine Data Source

D

David

Hi, y'all.

We have a set of Word Merge files that make use of data from a variety of
different Access databases with identical data structures and queries.

When I click the 'Open Data Source' command button on the Mail Merge toolbar
it will allow me to select any Access database I want to relink to, but is
there any way to determine which Access database the Word document is
currently linked to before I change it?

Thanks in advance!

David
 
D

Doug Robbins - Word MVP

Running a macro containing the following command when the mail merge main
document is the active document will display a message box containing the
path\name of the data source.

MsgBox ActiveDocument.MailMerge.DataSource.Name


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

Cindy M -WordMVP-

Hi =?Utf-8?B?RGF2aWQ=?=,
We have a set of Word Merge files that make use of data from a variety of
different Access databases with identical data structures and queries.

When I click the 'Open Data Source' command button on the Mail Merge toolbar
it will allow me to select any Access database I want to relink to, but is
there any way to determine which Access database the Word document is
currently linked to before I change it?
Which version of Word are you using?

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 :)
 
C

Cindy M -WordMVP-

Hi =?Utf-8?B?RGF2aWQ=?=,
For this version, if I just want to check, I

- go to Help/About Microsoft Word, then click System Info
- From the tree structure at the left of this dialog box
- Applications/Office 2003 Applications/Microsoft Office Word 2003
- Select "Mail merge"
- all kinds of interesting things appear in the list on the right, including
full information about the data source

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 :)
 
D

Doug Robbins - Word MVP

Interesting, but on my system, that is not that long in the tooth, I think I
could write a macro to give me the information in the time that it took to
Refresh the System Information and display the results.

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

David

Kewl! That helps a lot, too. This solution has the advantage that I don't
have to put a macro into the document and have to deal with macro security on
user's machines.

Thanks!
 
C

Cindy M -WordMVP-

Hi Doug,
Interesting, but on my system, that is not that long in the tooth, I think I
could write a macro to give me the information in the time that it took to
Refresh the System Information and display the results.
If you have an OLE DB connection, you may not get the entire connection
information through the VBA interface (granted, .Name will usually work; but
ConnectionString often won't).

-- Cindy Meister
 

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