+ Reply to Thread
Results 1 to 6 of 6

Macro to split mail merge into separate documents (MAC)

  1. #1
    Registered User
    Join Date
    10-22-2015
    Location
    Australia
    MS-Off Ver
    Mac 2011
    Posts
    3

    Macro to split mail merge into separate documents (MAC)

    Hi all,
    I am an absolute beginners at macros, to the extent where I had to google how to install them, let alone run them!

    I am using Mac 2011, and want to be able to split the results of a mail merge document into separate documents (one per record), hopefully renaming the new documents using one of the fields from the excel database. At this stage I'm not sure if I need the final document to be a docx or pdf, but docx will do to begin with!

    I've found lots of code to show how to do this in the windows versions, but they don't appear to work on my mac program.

    Can anyone help me, or direct me to somewhere I can find more information? Thanks!

  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: Macro to split mail merge into separate documents (MAC)

    See: http://answers.microsoft.com/en-us/m...5fd9808?auth=1
    Last edited by macropod; 10-22-2015 at 05:29 PM.
    Cheers,
    Paul Edstein
    [Fmr MS MVP - Word]

  3. #3
    Registered User
    Join Date
    10-22-2015
    Location
    Australia
    MS-Off Ver
    Mac 2011
    Posts
    3

    Re: Macro to split mail merge into separate documents (MAC)

    Thanks for the reply I've tried that code, but it didn't seem to work.

    I am a complete beginner at macros, but this is what I did, based on instructions I found online:

    Go to Tools > Macro > Macros...
    Type the name of the new macro to be added (in this case "SaveOneDocumentPerDataRecord") and then the Create button
    Paste the code from the linked page into the window that opens (which is in Normal - Modules - NewMacros), ensuring that the sub/end sub lines aren't doubled up.

    After saving this, I went back to my document, and ran the macro (Tools > Macro > Macros... SaveOneDocumentPerDataRecord, then Run). It seems to do something (the mail merge manager sort of blinked), but doesn't seem to have created new files or the like. The only thing that I can see is different is that step 6 of the mail merge manager (complete merge) has changed from "all records" to "custom 1 to 1" instead.

    I did notice that the macro was talking about a word data source (i have been using an excel spreadsheet), so I created a new word datasource, but that didn't seem to make a difference.

    Any suggestions on how to troubleshoot gratefully accepted! Maybe I should try posting on the thread you linked to?

  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: Macro to split mail merge into separate documents (MAC)

    Given that the code in the link is specifically for Macs, the problem is likely related to your implementation. For example, the code in the macro constructs the output filename from two DataFields, one named 'K' and one named 't'. Naturally, you'd need to change those names to match the field names in your datasource.

    There is also no need to create a new word datasource - the macro is designed to work with whatever your existing data source is (i.e. your Excel workbook).

  5. #5
    Registered User
    Join Date
    10-22-2015
    Location
    Australia
    MS-Off Ver
    Mac 2011
    Posts
    3

    Re: Macro to split mail merge into separate documents (MAC)

    Thank you so much! That was the tip I needed, I've changed the K and t to reflect fields in my database and it's working a treat! Thanks again for your (super quick) help

  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: Macro to split mail merge into separate documents (MAC)

    You're welcome.

+ 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. Split Mail Merge & Save as Seperate Documents
    By timbo1957 in forum Word Programming / VBA / Macros
    Replies: 1
    Last Post: 10-01-2015, 12:14 AM
  2. Replies: 0
    Last Post: 09-11-2015, 09:11 AM
  3. Why must I keep reconnecting the spreadsheet for my mail merge documents?
    By reallawyer in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-21-2014, 03:52 PM
  4. [SOLVED] Macro for mail merge and save as word documents
    By aganesan99 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-23-2013, 09:16 AM
  5. Mail merge - create seperate documents
    By manito2000 in forum Excel General
    Replies: 0
    Last Post: 08-03-2011, 03:06 PM
  6. Split mail merge into separate headed columns
    By Annodeus in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 08-08-2006, 10:55 AM
  7. [SOLVED] how do I use mail merge in excel for word documents
    By Lisa J Duffy in forum Excel General
    Replies: 1
    Last Post: 08-04-2005, 09:05 AM

Tags for this Thread

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