#1
|
|||
|
|||
Word 2010 and Excel 2010 Mail merge - multiple headers
Hi - I have a spreadsheet that contains following fields:
Customer Name, Address etc. Product Name Product Price/Total I need to set up my mail merge so it brings in the Customer record for each letter BUT ALSO brings in ONLY the Product items where a currency value is present in the Price field. I have found a solution to bringing excel currency format across to word merge field so thats ok. BASICALLY - I want it to merge a list of PRODUCT ITEMs from the Product Mail Merge Field IF there is a value in the adjacent Price Merge Field (from the spreadsheet.) and leave out any blank Price fields. I cant figure out how to set up either the s/sheet or the mail merge fields in word. I hope that is a clear explanation - but I don't think it can be too hard to do. Any help appreciated. |
#2
|
|||
|
|||
You want to use an IF field to test the value of the price field to be > 0. What you want is for your item name field to be the true result of the IF field, together with a paragraph mark so you don't have a blank line.
You can find the If field in Insert > Quick Parts > Field or on the Mailings Ribbon under Rules. |
#3
|
|||
|
|||
Thanks for the reply - I have tried to do those steps but I must be doing something wrong.
The product name isnt in the word file - I want the merge to bring that in If there is a value in that column OR leave it out and not leave a blank line just go to the next item in the list. This is how my sheet table is laid out: Customer Water Wine Beer ABC $22.00 $25.00 $0.00 DEF $0.00 $44.00 $0.00 GHI $0.00 $0.00 $23.00 I need to know how the merge field codes look to get the following outcomes: (Customer ABC should merge the NAME of the product AND the Price) Water $22 Wine $25 (Customer DEF should merge the NAME of the product AND the Price) Beer $23 Ill keep playing with it to try and make it work. |
#4
|
|||
|
|||
Turn on display of field codes when writing fields. Alt-F9
This is what the fields will look like. Note the line break in the middle of the fields which is actually a paragraph mark. { IF { MERGEFIELD Water } > 0 "Water: { MERGEFIELD Water } " "" }{ IF { MERGEFIELD Beer } > 0 "Beer: { MERGEFIELD Beer } " "" }{ IF { MERGEFIELD Wine } > 0 "Wine: { MERGEFIELD Wine } " "" } Note the braces {} cannot be typed in from the keyboard. They have to be inserted by Word. They come in pairs. They are inserted when you add a merge field or a regular field. You can make your own fields with Ctrl-F9 which inserts a pair. |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
word 2010 mail merge execute twice | smaddi | Mail Merge | 1 | 02-05-2012 02:45 AM |
Mail Merge using Word 2010 - Header source not be recognized | Gage262 | Word | 8 | 02-01-2012 11:08 AM |
Outlook 2010, Word2010 and Mail Merge | mnorman | Outlook | 8 | 12-16-2011 12:42 PM |
Mail with macro Excel 2010 | santors71 | Excel Programming | 1 | 12-07-2011 06:34 AM |
Outlook 2010 crashes upon including multiple recepients prior to sending e-mail | kris_sordo | Outlook | 2 | 04-25-2011 08:23 PM |