+ Reply to Thread
Results 1 to 6 of 6

Split merge doc and save in any of the merge field data

  1. #1
    Forum Contributor
    Join Date
    10-08-2013
    Location
    Chennai, INDIA
    MS-Off Ver
    Excel 2010
    Posts
    157

    Question Split merge doc and save in any of the merge field data

    Hi All,

    Have searched and s found simple VBA code to split the mail merge into single document and save it with a name of merge field.

    But it has a limitation i presume. code comment says it has assigned a code line for loop.... but when i tried loop is not working.

    it generates only one record. Can any one please help me in making it work....

    Please Login or Register  to view this content.
    Bala

  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: Split merge doc and save in any of the merge field data

    See 'Send Mailmerge Output to Individual Files' in the Mailmerge Tips and Tricks threads 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
    10-08-2013
    Location
    Chennai, INDIA
    MS-Off Ver
    Excel 2010
    Posts
    157

    Re: Split merge doc and save in any of the merge field data

    Hi macropod,

    Thanks a lot..... helps me a lot.

    I need a favor... Can you please help me....

    1.I open the excel contains merge field data
    2.Then click a button to run a macro
    3.Which opens the word doc with merge fields and VBA code you have provided to save each merge letter into single file.
    4.The macro in the word must run automatically, that is it should be called through excel itself.

    With VBA MS applications everything is possible, but am very new to macro. Can you pls help me to achieve this.....

    Thanks a lot.... sorry to extend my question.....

  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: Split merge doc and save in any of the merge field data

    That is a whole lot more complex. Try the following Excel code:
    Please Login or Register  to view this content.
    For testing purposes, you might want to comment-out the line 'wdApp.Visible = False'. The code assumes you have a document named 'MailMergeMainDocument.docx' stored in the same folder as the Excel workbook. That document should be saved as an ordinary document, not as a mailmerge main document. As coded, the macro also assumes a standard query. If you're using filtering, you will have to add that to the SQLStatement in the macro.

  5. #5
    Forum Contributor
    Join Date
    10-08-2013
    Location
    Chennai, INDIA
    MS-Off Ver
    Excel 2010
    Posts
    157

    Re: Split merge doc and save in any of the merge field data

    Thanks a lot sir....

  6. #6
    Registered User
    Join Date
    03-23-2018
    Location
    Atlanta
    MS-Off Ver
    Excel 2016
    Posts
    11

    Re: Split merge doc and save in any of the merge field data

    I just used this! Very helpful

+ 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. [SOLVED] Mail Merge: The merge provides data from the previous record
    By bellevue in forum Excel General
    Replies: 3
    Last Post: 10-23-2012, 07:44 AM
  2. change merge code to split the data
    By bujji1305 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 05-23-2012, 02:28 AM
  3. Excel 2007 : How to save mail merge field matching data
    By David4322 in forum Excel General
    Replies: 0
    Last Post: 09-05-2011, 08:00 PM
  4. Replies: 0
    Last Post: 04-21-2006, 03:40 PM
  5. [SOLVED] how do i get my mail merge to update the data source at each merge
    By Steel_Monkey in forum Excel General
    Replies: 0
    Last Post: 11-30-2005, 04:45 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