Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Aug 2002
    Location
    Leuven, Vlaanderen, Belgium
    Posts
    322
    Thanks
    9
    Thanked 0 Times in 0 Posts

    mail merge to separate doc's (with automation?) (97)

    A.S. I post this question too at www.tek-tips.com (thread705-373071) & I'll put a small post on Woody's Access forum as well, as this is both an Access (how can I use variables when I automate Word by calling Word macro's from Access) & Word problem (mail merge to seperate documents).

    Hey,

    Consider a Word main document & data file ready for 'mail merge'. Word provides this feature BUT you can only produce one file at the time, even if you mail merge for all records ... I can understand this is sufficient when all letters are print out 'hard copy'. We want, however, a separate file for each record: it is a private letter which needs to be sent (also) by e-mail to each instance (in private). Also more in general however, when the mailing must be spread digitally, an X00 pages document with the relevant piece submerged somewhere inside it, is not an option.

    How can this be done?

    Some tedious (wrong?) web searching only revealed this tip: put the first paragraph in Header 1 style. Then, after mail merge, you can consider the result as some kind of main document of which you can save the parts as sub documents. (???)

    Maybe this works in some cases, but in the mean while, I'm close to another solution that also might work (& better suited to our problem)...

    I'm quite close, IF I can solve one problem (supposing there are no dragons left waiting behind the corner): how to provide a variable to a Word macro using automation, e.g. from within Access?

    The rest of this post is some background about the progress I made to solve this. I hope I'm heading in the good direction

  2. #2
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: mail merge to separate doc's (with automation?) (97)

    It appears that you have run into one of the kinks in using Word Mail Merges driven from Access. And you are on the right track in looking at Automation and creating documents in Word from code running in Access. However we have found that once you take that approach, you are better off to forget the Mail Merge functions in Word completely. We do this for a number of client applications, and while it can be pretty tedious (like your web search), it works pretty well, and is generally faster than Mail Merges.

    The answer to your question is to use Automation in Access to generate the Word document, though the document could easily start with a template and boilerplate. Your proposed scenario 1 won't work very well as Access 97 is not capable of working as a fully functional Automation Server (later versions of Access can). And scenario 3 is fraught with Word's Mail Merge challenges and frailties, so scenario 2 is the one of choice in my opinion. Let me suggest you check out the Automation articles written by Bryan Carbonnell (a frequent contributor to the Access forum). You might want to check out chapters 20 and 21in the Access 97 Developers Handbook by Litwin, Getz, et. al. that covers similar topics. Finally you might want to look at some of the Microsoft Knowledge Base articles such as Q170988 and Q131583. Hope this helps with your project.
    Wendell

  3. #3
    3 Star Lounger
    Join Date
    Aug 2002
    Location
    Leuven, Vlaanderen, Belgium
    Posts
    322
    Thanks
    9
    Thanked 0 Times in 0 Posts

    Re: mail merge to separate doc's (with automation?) (97)

    Wendell,
    I'll check it out. It looks promising.
    Thanks!
    Hans

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •