Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.formatting.longdocs
MyVeryOwnSelf
 
Posts: n/a
Default Can mail merge data source be relative?

I have an MS-Word "Address List" file with a table having the typical
address fields.

A number of MS-Word mail-merge documents refer to the Address List file.
They're all in the same folder as the Address List.

From time to time, I rename or move or copy the folder. I'd like the mail-
merge documents to continue using the Address list in their folder, but
Word seems to use an absolute path name as the internal data-source
reference. So I end up having to manually change the data source of each
mail-merge document.

Is there a way to make the data source references relative, so they'll
track the folder renames and moves?

If that's not possible, is there a way to include an environment variable
in the reference? For example, I have a Windows file shortcut with a target
like this:
"C:\Documents and Settings\self\My Documents\%THISYEAR%"
where THISYEAR is an environment variable that gets changed each January 1.
  #2   Report Post  
Posted to microsoft.public.word.formatting.longdocs
Cindy M -WordMVP-
 
Posts: n/a
Default Can mail merge data source be relative?

Hi MyVeryOwnSelf,

I have an MS-Word "Address List" file with a table having the typical
address fields.

A number of MS-Word mail-merge documents refer to the Address List file.
They're all in the same folder as the Address List.

From time to time, I rename or move or copy the folder. I'd like the mail-
merge documents to continue using the Address list in their folder, but
Word seems to use an absolute path name as the internal data-source
reference. So I end up having to manually change the data source of each
mail-merge document.

Is there a way to make the data source references relative, so they'll
track the folder renames and moves?

No, unfortunately mail merge isn't designed to work on this principle. The
best you can do is to place an AutoOpen macro in each of these documents (or
a template all the documents would share) that would
1. Check the path of the current document
2. Attach the data source

I describe how this is done, and provide code, in "Office VBA Macros you can
use Today" from "Holy Macro" press.

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

Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Word 2002 cannot find its Excel data source for mail merge harryedwards Mailmerge 5 November 23rd 05 11:09 AM
mail merge data source is blank Dick W. Mailmerge 2 October 24th 05 07:56 PM
Mail Merge using an Excel spreadsheet as a data source SharronTucker Microsoft Word Help 2 June 24th 05 06:11 PM
Mail Merge Issue With Office 97 - Excel Data Source Matt Thorley Mailmerge 1 February 15th 05 11:38 PM
multiple docs, one data source kp Mailmerge 12 January 31st 05 04:41 PM


All times are GMT +1. The time now is 09:09 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"