Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-18-2012, 05:43 AM
robby robby is offline Word 2010 and Excel 2010 Mail merge - multiple headers Windows 7 32bit Word 2010 and Excel 2010 Mail merge - multiple headers Office 2010 32bit
Novice
Word 2010 and Excel 2010 Mail merge - multiple headers
 
Join Date: Apr 2012
Posts: 2
robby is on a distinguished road
Default 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.
Reply With Quote
  #2  
Old 04-18-2012, 07:18 AM
Charles Kenyon Charles Kenyon is offline Word 2010 and Excel 2010 Mail merge - multiple headers Windows Vista Word 2010 and Excel 2010 Mail merge - multiple headers Office 2010 32bit
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,081
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

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.
Reply With Quote
  #3  
Old 04-18-2012, 04:23 PM
robby robby is offline Word 2010 and Excel 2010 Mail merge - multiple headers Windows 7 32bit Word 2010 and Excel 2010 Mail merge - multiple headers Office 2010 32bit
Novice
Word 2010 and Excel 2010 Mail merge - multiple headers
 
Join Date: Apr 2012
Posts: 2
robby is on a distinguished road
Smile

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.
Reply With Quote
  #4  
Old 04-18-2012, 06:37 PM
Charles Kenyon Charles Kenyon is offline Word 2010 and Excel 2010 Mail merge - multiple headers Windows Vista Word 2010 and Excel 2010 Mail merge - multiple headers Office 2010 32bit
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,081
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

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.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Word 2010 and Excel 2010 Mail merge - multiple headers 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
Word 2010 and Excel 2010 Mail merge - multiple headers 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

Other Forums: Access Forums

All times are GMT -7. The time now is 05:06 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