Mail Merge - Create New Documents - Form Letter

D

Dave Baxandall

Is is possible to have word create a new document for each
record in a spreadsheet.
Example we need to email 3 different individuals a form
letter.
When I run the mail merge it creates on document 3 pages
long. I need to have 3 documents 1 page long.


Thanks in advance
Dave Baxandall
 
C

Cindy M -WordMVP-

Hi Dave,

You should find one approach on my website, and I think
another one is at mvps.org/word. Both require using VBA on
the merge result.
Is is possible to have word create a new document for each
record in a spreadsheet.
Example we need to email 3 different individuals a form
letter.
When I run the mail merge it creates on document 3 pages
long. I need to have 3 documents 1 page long.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep
30 2003)
http://www.mvps.org/word

This reply is posted in the Newsgroup; please post any follow
question or reply in the newsgroup and not by e-mail :)
 
D

Dave Baxandall

Thanks Cindy, I'm experienced with VBA but not using word.
Is this code stored in normal.dot or can it be stored in
the mail merge source document? If it's stored in the
source document how do I make the VB code visible to the
new form letter document.

Thanks again.
 
C

Cindy M -WordMVP-

Hi Dave,
Thanks Cindy, I'm experienced with VBA but not using word.
Is this code stored in normal.dot or can it be stored in
the mail merge source document? If it's stored in the
source document how do I make the VB code visible to the
new form letter document.
This depends on which code solution you're referring to?
Generally, if it's one that runs the merge, then performs the
"take it apart and save it" it can be in the the main merge
doc, its template, or in Normal.dot

If you want to run it AFTER the merge, then it should be in
Normal.dot or another global template (addin). The main merge
doc's TEMPLATE would - theoretically - also be a possibility.
But practically the link from the merge result doc to that
template is not 100% complete following the merge and the
template would have to be re-attached to the result document
before the macro would be available. (Either using VBA for
the merge, or manually after the merge.)

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep
30 2003)
http://www.mvps.org/word

This reply is posted in the Newsgroup; please post any follow
question or reply in the newsgroup and not by e-mail :)
 
D

Dave Baxandall

Cindy everything is working fine. I added 2 bits of code
to yours. My entire process starts in excel. It longs on
to SAP and to retrieve data. It then starts a word
template that sets up a mail merge and runs it. Now with
your code it creates several word documents without the
save and removes the subdocment link in the form letter.
After all of that, it closes the form letter and template
document without saving it. The user is then left with
individual word documents that they can modify before
emailing.

1. After the merge I added.
SaveDocName = ActiveDocument.Name
This lets me shut down the form letter.
2. In routine SaveAllSubDocs. I removed the save as and
added
For Each subdoc In doc.Subdocuments
doc.Subdocuments.Expanded = Not doc.Subdocuments.Expanded
Next subdoc

Thank you so much!!!
Dave

Sap Developer,
SAP R/3 Support Services, TELUS Communications.
26-G, 10020 - 100 Street, Edmonton, Alberta, Canada T5J 0N5
E-mail: (e-mail address removed)
Phone: (780) 493-5563
Cell: (780) 886-2153
FAX: (780) 493-5328
 
C

Cindy M -WordMVP-

Hi Dave,
everything is working fine. I added 2 bits of code
to yours. My entire process starts in excel. It longs on
to SAP and to retrieve data.
Glad you've got it doing what you want :) And I'm
especially glad to be able to help an SAP developer, for
two reasons:
1. My best friend is one of those <g>
2. And she always says SAP doesn't really want to be using
outside apps. So it tickles me to find an SAP developer who
DOES (and can get it to work) <bg>

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update
Sep 30 2003)
http://www.mvps.org/word

This reply is posted in the Newsgroup; please post any
follow question or reply in the newsgroup and not by e-mail
:)
 

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