Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
I am pulling info out of my database and inserting it into Microsoft Excel to
use as a mail merge for a listing of companies. The problem is that I do not have all criteria for all companies, so for example if I didn't have an email in my example below, "Email:" would appear with a blank next to it. Is there any way to not show email if it is empty? Company Name: company name Email: email Phone: phone |
#2
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
On the whole it is best to insert a nested field like
{ IF "{ MERGEFIELD email }" = "" "" " Email: { MERGEFIELD email }" } so you end up with e.g. { IF "{ MERGEFIELD "company name" }" = "" "" " Company Name: { MERGEFIELD "company name" }" }{ IF "{ MERGEFIELD email }" = "" "" " Email: { MERGEFIELD email }" }{ IF "{ MERGEFIELD phone }" = "" "" " Phone: { MERGEFIELD phone }" } (In recent versions of Windows Word you may be able to get away with { MERGEFIELD "company name" \b "Company Name: " } { MERGEFIELD email \b "Email: " } { MERGEFIELD phone \b "Phone: " } but I would go for the nested IF approach). All the {} need to be the special field code brace pairs that you can insert using ctrl-F9, not the sort you can type on the keyboard. Peter Jamieson http://tips.pjmsn.me.uk On 10/12/2009 18:28, Kevin wrote: I am pulling info out of my database and inserting it into Microsoft Excel to use as a mail merge for a listing of companies. The problem is that I do not have all criteria for all companies, so for example if I didn't have an email in my example below, "Email:" would appear with a blank next to it. Is there any way to not show email if it is empty? Company Name:company name Email:email Phone:phone |
#3
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
Ahh i see with Ctrl + F9. Thank you very much for your time, I will try that
out! ![]() "Peter Jamieson" wrote: On the whole it is best to insert a nested field like { IF "{ MERGEFIELD email }" = "" "" " Email: { MERGEFIELD email }" } so you end up with e.g. { IF "{ MERGEFIELD "company name" }" = "" "" " Company Name: { MERGEFIELD "company name" }" }{ IF "{ MERGEFIELD email }" = "" "" " Email: { MERGEFIELD email }" }{ IF "{ MERGEFIELD phone }" = "" "" " Phone: { MERGEFIELD phone }" } (In recent versions of Windows Word you may be able to get away with { MERGEFIELD "company name" \b "Company Name: " } { MERGEFIELD email \b "Email: " } { MERGEFIELD phone \b "Phone: " } but I would go for the nested IF approach). All the {} need to be the special field code brace pairs that you can insert using ctrl-F9, not the sort you can type on the keyboard. Peter Jamieson http://tips.pjmsn.me.uk On 10/12/2009 18:28, Kevin wrote: I am pulling info out of my database and inserting it into Microsoft Excel to use as a mail merge for a listing of companies. The problem is that I do not have all criteria for all companies, so for example if I didn't have an email in my example below, "Email:" would appear with a blank next to it. Is there any way to not show email if it is empty? Company Name:company name Email:email Phone:phone . |
Reply |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
In Mail Merge how do I get rid of empty fields? | Mailmerge | |||
Using if fields in mail merge to ignore empty fields | Mailmerge | |||
omit blank mail merge fields | Mailmerge | |||
How do I omit an empty date merge field? | Microsoft Word Help | |||
Word 2002 Mail Merge - merging to new doc displays blank empty dia | Mailmerge |