View Single Post
  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Dixie
 
Posts: n/a
Default Code in a mailmerge template

I was looking for a way to change the data source in the mailmerge template
without navigating to the actual text file containing the data. There is
only one letter difference between them and there are over 120 mailmerge
templates. I have done one lot of them where I changed a C:\ to T:\ in a
path and it took me just on two hours, including the sleep/trance time from
the repetetiveness of the task. I have to do a quite a few of these from
time to time and I was hoping I could find the path in some vba in the
mailmerge template and just change the letter. No such luck I guess. The
code you gave did report the path, but is not useful in changing it.

Thanks anyway.

dixie

"Doug Robbins - Word MVP" wrote in message
...
Run a macro containing the following code:

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

"Dixie" wrote in message
...
When I connect a mailmerge template to a text file via the Get Data
button
on the MailMerge Helper in Word 2000, is there anywhere in the template
that
I can later view that path and file name where the template looks for its
merge data. Where in the mailmerge template is the information stored?

dixie