A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » Formatting Long Documents
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Can mail merge data source be relative?



 
 
Thread Tools Display Modes
  #1  
Old May 8th, 2006, 11:12 PM posted to microsoft.public.word.formatting.longdocs
external usenet poster
 
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  
Old May 9th, 2006, 09:57 AM posted to microsoft.public.word.formatting.longdocs
external usenet poster
 
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 :-)

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I mail merge to EMAIL from MS Word AND add a pdf attachment Lily@Insight Mailmerge 24 January 15th, 2007 09:33 PM
How do I create a read-only mail merge data source? Julie Mailmerge 3 November 16th, 2005 07:23 PM
Mail Merge losing data source Graham Mailmerge 0 September 15th, 2004 04:07 PM
Mail Merge uses Outlook instead of Excel data source Karminak Mailmerge 1 May 21st, 2004 10:20 AM
Mail Merge Disable Choose Data Source Cindy M -WordMVP- Mailmerge 0 April 24th, 2004 10:08 AM


All times are GMT +1. The time now is 11:36 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.