How to change datasource directory

S

Steve L

I have a mailmerge set up using Word 2003 that uses an excel 2003
spreadsheet as its data source. Every two months both the main document and
the excel spreadsheet are copied to a new directory for that mailing and a
new merge to document is performed.

My question is, How can I change the datasource (called grades.xls) so that
word will always look for it in the same directory as the word main document
was launched.?

I know this is a small thing, but it would cut down on a number of errors
and extra steps that seem unnecessary.

Many thanks

SL
 
C

Cindy M -WordMVP-

Hi Steve,
I have a mailmerge set up using Word 2003 that uses an excel 2003
spreadsheet as its data source. Every two months both the main document and
the excel spreadsheet are copied to a new directory for that mailing and a
new merge to document is performed.

My question is, How can I change the datasource (called grades.xls) so that
word will always look for it in the same directory as the word main document
was launched.?
You can't. This same question has been discussed in a couple of other messages
over the last 24 hours...

Word stores the link to the data source as an absolute path, in the binary
structure of the document. You have to open the document and reconnect to the
data source. Possibly, an AutoOpen macro could help you with this that
- checks the path for the main merge document
- looks for the data source in the same folder
- links it in

If you're interested in this approach, start by recording a macro when linking
to the data source, then paste the result in your reply. Note: I highly
recommend that you use ODBC or DDE and not the default OLE DB for this.

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

Steve L

Thanks, Cindy

I was kind of afraid of that. Oh well, perhaps in Office 12 or 13!

Steve
 

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