+ Reply to Thread
Results 1 to 6 of 6

Can you have a macro that exports individual mail merge and names based on merge fields?

  1. #1
    Forum Contributor
    Join Date
    01-09-2016
    Location
    USA,USA
    MS-Off Ver
    2016
    Posts
    1,192

    Can you have a macro that exports individual mail merge and names based on merge fields?

    I have a mail merge document that has about 40 pages I need to individually export and name them in a specific manner. Is it posisble to create a Micro that will export each page and then name the file based on specific merge fields?

  2. #2
    Forum Expert macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,726

    Re: Can you have a macro that exports individual mail merge and names based on merge field

    Once you've completed a merge, there are no mergefields for a macro to query. Instead, see Send Mailmerge Output to Individual Files and Split Merged Output to Separate Documents in the Mailmerge Tips and Tricks thread at:
    http://www.msofficeforums.com/mail-m...ps-tricks.html
    or:
    http://windowssecrets.com/forums/sho...ips-amp-Tricks
    Cheers,
    Paul Edstein
    [Fmr MS MVP - Word]

  3. #3
    Forum Contributor
    Join Date
    01-09-2016
    Location
    USA,USA
    MS-Off Ver
    2016
    Posts
    1,192

    Re: Can you have a macro that exports individual mail merge and names based on merge field

    i'm sorry, I must have done a terrible job explaining, because I can export and name based on a merge field. I was able to find code online and modify it do it kinda. I just don't know how to make it repeat, or ideally let me tell it to do the first 30 records or something like that.

    Please Login or Register  to view this content.

  4. #4
    Forum Expert macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,726

    Re: Can you have a macro that exports individual mail merge and names based on merge field

    The code you posted isn't for what your first post described. You really should look at the Send Mailmerge Output to Individual Files topic in the link I provided.

  5. #5
    Forum Contributor
    Join Date
    01-09-2016
    Location
    USA,USA
    MS-Off Ver
    2016
    Posts
    1,192
    Quote Originally Posted by macropod View Post
    The code you posted isn't for what your first post described. You really should look at the Send Mailmerge Output to Individual Files topic in the link I provided.
    No. It is what I described. Or as close as I could get since I didn’t know how. The macro exports the mail merge document and names it based on merge fields. Not sure how that isn’t as described.

  6. #6
    Forum Expert macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,726

    Re: Can you have a macro that exports individual mail merge and names based on merge field

    Your first post says:
    Quote Originally Posted by taylorsm View Post
    I have a mail merge document that has about 40 pages I need to individually export and name them in a specific manner. Is it posisble to create a Micro that will export each page and then name the file based on specific merge fields?
    So, unless you're saying the mailmerge main document is 40 pages long, the clear implication is that the 40-page document is the output document. Regardless, I've twice referred you to an article that says how to achieve what you want via a macro that runs from the mailmerge main document.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Group Fields in Mail merge based on common field
    By Sinon05 in forum Word Formatting & General
    Replies: 2
    Last Post: 03-04-2016, 01:46 AM
  2. Mail Merge - Merge fields lister macro
    By adil.master in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-26-2015, 10:33 AM
  3. VBA / Macro / Mail Merge / Save as individual pdf files
    By Perav in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-06-2015, 10:41 AM
  4. Replies: 0
    Last Post: 06-24-2015, 02:34 AM
  5. Replies: 0
    Last Post: 01-05-2015, 07:35 AM
  6. Macro to Mail Merge individual PDF docs as attachments to email saved in draft box
    By cstockley in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-13-2013, 08:33 AM
  7. Mail Merge Query - Format of Merge Fields in Word
    By carlosbourn in forum Excel General
    Replies: 2
    Last Post: 11-10-2007, 07:11 AM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1