View Single Post
  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
DanielWalters6
 
Posts: n/a
Default Dynamic DataSource paths?

Dear Cindy, I have been in contact with another MVP who has suggested another
way of getting over my problem. Could I run by his methods with you, to see
if it will achieve what I am looking for? (I'm unable to access my computer
for several days)
====
1. Create the filename.mdb file in Access 2003.
2. Create your Word doc and save it in the same folder as the mdb file.
3. Use the Word Mail Merge wizard to get recipients from an existing list -
when prompted, double-click Connect to a New Data Source.odc - select
Other/Advanced, then Microsoft Jet 4.0 OLE DB provider, then specify the path
..\filename.mdb, select the table in the mdb file that contains your
recipients, and save the data source as filename.odc in the same folder as
the mdb and doc files, and sort / remove recipients from the list if
necessary.
4. Create your mail merge document.
5. Include the odc file with the doc and mdb files when you distribute the
solution.

I would like to know your opinion, if this will be easier to do that
creating the AutoOpen Marco that you talked about and also if they are both
as dynamic as each other.

Thankyou, as a MVP, your opinions are valued.

Dan

"Cindy M -WordMVP-" wrote:


In a nutshell: it can't be done without the help of macro code.

Word's support of relative file paths is limited, and unstable at best. They're
supported for IncludeText and IncludePicture fields, hyperlinks, but that's
pretty much the extent of it. Certainly not for mail merge.

Best you could do would be an AutoOpen macro that gets the current path of the
active document and plugs that into the basic connection information for the
opendatasource method.

I'm currently in the process of creating a database.

I have a Word Document that contains a Mail Merge. The data source for this
mail merge is an Access Database Query.

They are both stored within the same folder.

I want to distribute the Database with the Microsoft Word Mail Merge.

But I'm finding that when I move them, the Mail Merge is still trying to
look up data that is stored in the original location of the database.

Which, obviously when put on a different computer/network drive doesn't
work. I presumed that it would be dynamic but it remains static.

I've spoken to a Teacher of I.T and computing and they suggested using a dot
(.) and a backslash ( \ ) to make WORD look within the folder that the mail
merge is stored in, and to find the filename that follows eg.

..\Databasefile.mdb

When I add this in, it still doesn't work. It accepts this as a file name,
but still WORD looks for the original copy of the database when I'm
transporting it.

I COULD leave instructions for the end-user to update the file path of the
database, but as this database will be transported around quite a lot, this
will be a pain in the arse.


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