Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Closed Thread
 
Thread Tools Display Modes
  #1  
Old 10-05-2011, 05:18 PM
macropod's Avatar
macropod macropod is offline Mail merge with Duplicate Names but Different Dollar Amounts Windows 7 64bit Mail merge with Duplicate Names but Different Dollar Amounts Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,514
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi bh,

Try the attached. Do note that, unless you separate the source file into two separate files - one for money and the other for goods/services - there is no practical way of having two separate mailmerges. I've altered the donations document slightly to account for this. Also, since I used Word 2003 for this, I had to sort the Excel workbook by donor so that the filtering would work correctly.
Attached Files
File Type: zip WSM.zip (26.6 KB, 1549 views)
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
  #2  
Old 03-24-2014, 11:58 AM
jh32 jh32 is offline Mail merge with Duplicate Names but Different Dollar Amounts Windows 7 32bit Mail merge with Duplicate Names but Different Dollar Amounts Office 2010 32bit
Novice
 
Join Date: Mar 2014
Posts: 1
jh32 is on a distinguished road
Default Mail Merge Example

I am very new to Mailmerge functionality, but really need to learn it. I have reviewed your examples and am confused as to the order of the coding. Why does what appears to be the bottom half of the output come first?

Any guidance would be very much appreciated.
  #3  
Old 03-24-2014, 01:15 PM
macropod's Avatar
macropod macropod is offline Mail merge with Duplicate Names but Different Dollar Amounts Windows 7 32bit Mail merge with Duplicate Names but Different Dollar Amounts Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,514
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by jh32 View Post
Why does what appears to be the bottom half of the output come first?
Because it works that way... Basically, what happens is that each new group, except the first, triggers the output of the last part of the previous group's letter before the new group's first part is output.

If you expand the field code for the 'Using One Key' example from page 9 of the tutorial, except for the colouring, you'll see:
Code:
{QUOTE{IF{MERGESEQ}= 1 {SET Key ""} {SET LastKey {REF Key}}}{IF{MERGEFIELD State}<> {REF Key} "{IF{MERGESEQ}> 1 "↵

If you require more details about the above sales figures, please contact your {REF LastKey} Sales Manager.↵

Sincerely,↵


Customer Service Manager (National)↵
{DATE \@ "dddd, d MMMM yyyy"}↵
{IF{MERGEFIELD State}<> 0 {QUOTE 12}}"}{IF{MERGEFIELD State}<> 0 "Director,↵
Retail Sales {MERGEFIELD State}{SET Key {MERGEFIELD State}}↵
↵
These are the sales totals for {MERGEFIELD State \* Charformat}↵
↵
City Representative Sales↵
"}"}"{IF{MERGEFIELD State}<> 0 "{MERGEFIELD City} {MERGEFIELD Representative} {MERGEFIELD Sales \# $,0.00}↵
"}"}¶
In the above, the:
• green content outputs whatever goes at the start of each letter.
• orange content outputs the repeated data.
• red content outputs whatever goes at the end of each letter (technically, {IF{MERGEFIELD State}<> 0 {QUOTE 12}} is part of that).
• blue QUOTE field generates the page breaks between letters.
• purple fields manage whatever you use as the KEY to indicate a change of grouping.
• black content does the housekeeping, pulling all the others together and ensuring you don't get output being generated at the wrong time.
Although the whole field is depicted as a single paragraph with manual line breaks, there is nothing to stop you having multiple paragraphs with a variety of formatting, images, textboxes, etc. for the green and/or red portions.


Note: I've now closed this thread and moved later discussions to separate threads, as this thread was becoming quite long. If you need help with the issues discussed in this thread, please start a new one, linking to this one if necessary.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Closed Thread



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mail merge with Duplicate Names but Different Dollar Amounts Saving INDV mail merges During the mail merge sedain121 Mail Merge 2 10-04-2011 07:52 PM
Mail merge with Duplicate Names but Different Dollar Amounts Mail merge with names in content richard82 Mail Merge 1 07-07-2011 11:28 PM
Mail merge with Duplicate Names but Different Dollar Amounts Selecting Names in New Mail Message jackdashack Outlook 2 06-04-2011 04:19 PM
Duplicate Mail wekhine Outlook 0 06-03-2010 09:08 PM
Convert Dollar amount to text GeorgeLawshe Word 0 03-07-2010 10:17 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:58 PM.


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