Results 1 to 8 of 8
  1. #1
    New Lounger
    Join Date
    Jul 2002
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Mail Merge on all docs in a folder (XP)

    I need help creating a macro that will instruct all documents within a folder to perform a merge. Each doc has a data source attached. I have only created macros by recording in the past, and realize that it is probably time to start editing. I would appreciate any assistance you can offer!

    Thanks

  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 on all docs in a folder (XP)

    Three questions:
    Are you planning to kick this off from within Word, or some other application such as Excel or Access?
    How many documents are involved?
    What are your datasources for each document - Word, Outlook, Excel or Access?
    Wendell

  3. #3
    New Lounger
    Join Date
    Jul 2002
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Mail Merge on all docs in a folder (XP)

    Users will be working only in Word.

    What I need to do is this:

    Set up a folder for a new client:
    Begin with circa 25 documents containing merge fields (name, contact info, etc.) I can either copy blank versions of these documents into the folder or use a template to create them (assuming templates can contain mergefields and be attached to a data source).
    Create one Word data source containing 1 record for that client's info.

    Merge the Word data source with each document in the client's folder, saving and closing each document during the process.

    Thanks in advance for any direction you can offer.

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

    Re: Mail Merge on all docs in a folder (XP)

    Sorry for the delay in responding - spent 2 days in bed with the flu. <img src=/S/sick.gif border=0 alt=sick width=15 height=15>

    What you are suggesting should be possible to do with some fairly extensive Word VBA. The VBA is necessary because you are wishing to automate the merge of the 25 different documents (or am I presuming more than I should?). This becomes a much simpler project if the 25 documents are combined into one document with 25 sections. In that case, only one merge command is required and it can be run by the user once the Word data source is available. If you are constrained for whatever reason to actually having 25 separate files, your problem is far more difficult.

    Re your question about templates containing mergefields and being attached to a data source, I have never attempted to do that, as merge main doucments have many of the same characteristics as a template, but I don't know of any reason why they couldn't. On the other hand, you wouldn't want a data source already set presuming that the data source would be in a different folder for each client. Hope this is useful.
    Wendell

  5. #5
    New Lounger
    Join Date
    Jul 2002
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Mail Merge on all docs in a folder (XP)

    Thanks for your reply. I knew there was another way of looking at this. Now, if I could figure out how to save each section as a separate document using a macro, I'd be in business!

    Hope you're feeling better.

    Regards,

    Susan V

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

    Re: Mail Merge on all docs in a folder (XP)

    I take it that means that somebody said you have to have 25 separate Word documents <img src=/S/frown.gif border=0 alt=frown width=15 height=15>
    You can probably record a macro that steps through the result of the merge document and copies each selection to a new document and saves it with a given name, but getting to the point where it runs seamlessly is likely to be a challenge. What is you level of experience at programming, and what do you know about Word VBA?
    Wendell

  7. #7
    New Lounger
    Join Date
    Jul 2002
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Mail Merge on all docs in a folder (XP)

    Very little. I've really only recorded macros and then made minor changes to them. This sounds like more than I'm ready for.

    Susan <img src=/S/crybaby.gif border=0 alt=crybaby width=15 height=15>

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

    Re: Mail Merge on all docs in a folder (XP)

    It may be tilting at windmills, but the single document with multiple sections (which is what most mail merges turn out to be, but for different reasons) is a reasonably simple solution. You could certainly try the other approach - the biggest challenge is likely to be getting Word to find the correct folder for new documents to be stored in. Hope this doesn't ruin (or consume) your weekend.
    Wendell

Posting Permissions

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