Word Template files losing data file attachments

A

AnneM

use Word 2003 and export my data files from Access 2003. I save merge files
as templates (eg letters, labels, envelopes etc) and each time I select them
- file/new the data file has been removed from the doc.

If I save the merge file as a .doc file and just open it, this doesn't
happen, but it defeats the purpose of the whole template idea.

Any suggestions how to stop this happening. My export files are text file
and are comma and para mark delimited.
 
D

Doug Robbins - Word MVP

I have not found the need to save mailmerge main document files as
templates. If you want to do that, you will need to have an autonew macro
in the template that opens (attaches) the data source to the new document
that is being created from the template.

ActiveDocument.MailMerge.OpenDataSource Name:="[drive:\path\filename]"

--
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
 
C

Charles Kenyon

My experience has been that the data file remains attached. Recently I moved
my data files and it was a real pain. I ended up detatching the data file
from the template but writing a macro that would attach it when a new
document was created. (My macro is more flexible than Windows and easily
finds the data file even if I move things around because the data file is
kept in a subfolder of my workgroup templates folder. The macro finds the
workgroup templates folder setting and goes from there.) Doesn't answer your
question but it might help you work around your problem.

I use templates for mailmerge main documents because I almost always using
the merge with one record to create a custom document. I simply display the
data, lock the fields, and save the new document with the individual data
frozen in place. (This is also done with a macro that changes the document
to an ordinary Word document from a mailmerge document. The AutoNew macro
also calls up the select a record dialog.)
--
Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide


--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
 

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