Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-14-2015, 01:19 PM
ryano ryano is offline Mail Merge Multiple Rows Into One Document Grouped Windows 8 Mail Merge Multiple Rows Into One Document Grouped Office 2013
Novice
Mail Merge Multiple Rows Into One Document Grouped
 
Join Date: Mar 2015
Posts: 3
ryano is on a distinguished road
Default Mail Merge Multiple Rows Into One Document Grouped

I've found some help other places on the Internet to try and make this happen, but it's not working for me. Basically I have a very simple spreadsheet that looks similar to this except with many more rows and groups:



PHP Code:
Group   |   Name    |   Phone
Group 1 
|   Ryan    111-222-3333
Group 1 
|   Katie   112-223-3343
Group 2 
|   Josh    141-181-3183
Group 2 
|   Emily   129-831-4913
... 
etc.

And I want to mail merge multiple rows onto each sheet in Microsoft Word based on the Group column. Currently, everything's loaded in Word properly (including "Group" being sorted ascending).

This is the code:

Code:
{QUOTE{IF{MERGESEQ}=1 {SET Key “”} {SET LastKey {Key}}}{IF{MERGEFIELD Group}<> {Key} “{IF{MERGESEQ}> 1”
 
{IF{MERGEFIELD Group}<> 0 {QUOTE 12}}”}{IF{MERGEFIELD Group}<> 0 “Text: {SET Key {MERGEFIELD Group}}
 
{MERGEFIELD Group \* Charformat}
 
“}”}”{IF{MERGEFIELD Group}<> 0”{MERGEFIELD Name}/{MERGEFIELD Phone}”}”}
(The above brackets were used by pressing Ctrl+F9)

But I'm only getting this sort of result (one per page) when I preview:

PHP Code:
Ryan 111-222-3333 
When the desired result would be the "text" in the code above, along with all of the people's names and numbers in that group.
Reply With Quote
  #2  
Old 03-14-2015, 07:21 PM
ryano ryano is offline Mail Merge Multiple Rows Into One Document Grouped Windows 8 Mail Merge Multiple Rows Into One Document Grouped Office 2013
Novice
Mail Merge Multiple Rows Into One Document Grouped
 
Join Date: Mar 2015
Posts: 3
ryano is on a distinguished road
Default

I would also be cool with code that just gave me five records at a time -- regardless of any grouping.
Reply With Quote
  #3  
Old 03-15-2015, 12:08 AM
gmayor's Avatar
gmayor gmayor is offline Mail Merge Multiple Rows Into One Document Grouped Windows 7 64bit Mail Merge Multiple Rows Into One Document Grouped Office 2010 32bit
Expert
 
Join Date: Aug 2014
Posts: 4,101
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

See http://www.gmayor.com/ManyToOne.htm. Or if you want to go it alone, see Paul Edstein's Catalogue Mail Merge tutorial which you can download from my web site - http://www.gmayor.com/downloads.htm
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #4  
Old 03-15-2015, 08:29 AM
ryano ryano is offline Mail Merge Multiple Rows Into One Document Grouped Windows 8 Mail Merge Multiple Rows Into One Document Grouped Office 2013
Novice
Mail Merge Multiple Rows Into One Document Grouped
 
Join Date: Mar 2015
Posts: 3
ryano is on a distinguished road
Default

Quote:
Originally Posted by gmayor View Post
See http://www.gmayor.com/ManyToOne.htm. Or if you want to go it alone, see Paul Edstein's Catalogue Mail Merge tutorial which you can download from my web site - http://www.gmayor.com/downloads.htm
Thanks -- but I believe that's where I started from, and I can't figure out why the code I wrote is presenting output the way that it is.
Reply With Quote
  #5  
Old 03-23-2015, 04:27 PM
mcmuney mcmuney is offline Mail Merge Multiple Rows Into One Document Grouped Windows 8 Mail Merge Multiple Rows Into One Document Grouped Office 2013
Novice
 
Join Date: Mar 2015
Posts: 2
mcmuney is on a distinguished road
Default

Quote:
Originally Posted by ryano View Post
But I'm only getting this sort of result (one per page) when I preview:
The Preview function does not work when you utilize this grouped feature. In order to view the results, you must Finish & Merge.
Reply With Quote
Reply

Tags
mail merge, microsoft word 2013

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formula that can merge multiple rows with the same ID into one row Hilwey Excel 3 07-08-2015 08:50 PM
Mail Merge Multiple Rows Into One Document Grouped I want to add multiple rows into my document but I can not figure out the code jlw15931 Mail Merge 1 02-24-2015 05:03 AM
Mail Merge Multiple Rows Into One Document Grouped Easy mail merge but want to suppress rows ClaireAMAdams Mail Merge 5 04-30-2013 02:43 PM
Mail Merge Multiple Rows Into One Document Grouped Mail Merge a Listing grouped by specific field KarenLS Mail Merge 1 11-11-2012 02:41 PM
Mail Merge Multiple Rows Into One Document Grouped Mail Merge multiple rows? ender541 Mail Merge 1 08-21-2012 03:14 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:29 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft