Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Very difficult mailmerge question (ExcelWord)
Hello, I have become desperate with this job I must do at work ....
I have to print labels in Word from a huge Excel sheet with the following fields: name/streetaddress/POBox/City/Country This would be easy, however, there are conditions that I just cannot get to work. If the POBox field is not blank, then, I want to print the following label; name//POBox/City/Country If the POBox field is blank, then, I want to print the following label: name/streetaddress//City/Country To explain otherwise, the POBox is the most important element, and it must be printed if it is present, However, if it is blank we have to use the street address. HOWEVER, POBox AND streetaddress MUST NEVER BOTH appear together on the same label. And that is where I am stuck. Can anybody help??? I would be sooooo relieved if someone could find a solution, I have been trying to do it forever... |
#2
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Very difficult mailmerge question (ExcelWord)
Taking your requirement literally, what you need is this:
{ MERGEFIELD name }/{ IF { MERGEFIELD POBox } = "" "{ MERGEFIELD streetaddress }/" "/{ MERGEFIELD POBox }" }/{ MERGEFIELD City }/{ MERGEFIELD Country } where each set of {} are the special field code braces that you can insert using ctrl-F9 Peter Jamieson http://tips.pjmsn.me.uk Marbetu wrote: Hello, I have become desperate with this job I must do at work .... I have to print labels in Word from a huge Excel sheet with the following fields: name/streetaddress/POBox/City/Country This would be easy, however, there are conditions that I just cannot get to work. If the POBox field is not blank, then, I want to print the following label; name//POBox/City/Country If the POBox field is blank, then, I want to print the following label: name/streetaddress//City/Country To explain otherwise, the POBox is the most important element, and it must be printed if it is present, However, if it is blank we have to use the street address. HOWEVER, POBox AND streetaddress MUST NEVER BOTH appear together on the same label. And that is where I am stuck. Can anybody help??? I would be sooooo relieved if someone could find a solution, I have been trying to do it forever... |
#3
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Very difficult mailmerge question (ExcelWord)
Hi Peter,
I think it would be best to provide for two localities, since it's possible the PO Box is in a different locality from the street address (my own is). Hopefully the OP has such fields in the Excel file. Assuming that is so: «Name»/{IF«POBox»= "" "«StreeAddr»/«StreetCity» «State» «Country» «StreetZip»" "«POBox»/«POCity» «State» «Country» «POZip»"} The field brace pairs (ie '{ }') for the above example are created via Ctrl-F9 - they can't be typed or copied & pasted from this message. Ditto the chevrons (ie '« »') - they're part of the actual mergefields, which can be inserted from the mailmerge toolbar. -- Cheers macropod [Microsoft MVP - Word] "Peter Jamieson" wrote in message ... Taking your requirement literally, what you need is this: { MERGEFIELD name }/{ IF { MERGEFIELD POBox } = "" "{ MERGEFIELD streetaddress }/" "/{ MERGEFIELD POBox }" }/{ MERGEFIELD City }/{ MERGEFIELD Country } where each set of {} are the special field code braces that you can insert using ctrl-F9 Peter Jamieson http://tips.pjmsn.me.uk Marbetu wrote: Hello, I have become desperate with this job I must do at work .... I have to print labels in Word from a huge Excel sheet with the following fields: name/streetaddress/POBox/City/Country This would be easy, however, there are conditions that I just cannot get to work. If the POBox field is not blank, then, I want to print the following label; name//POBox/City/Country If the POBox field is blank, then, I want to print the following label: name/streetaddress//City/Country To explain otherwise, the POBox is the most important element, and it must be printed if it is present, However, if it is blank we have to use the street address. HOWEVER, POBox AND streetaddress MUST NEVER BOTH appear together on the same label. And that is where I am stuck. Can anybody help??? I would be sooooo relieved if someone could find a solution, I have been trying to do it forever... |
#4
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Very difficult mailmerge question (ExcelWord)
Yes, I see what you mean...
Peter Jamieson http://tips.pjmsn.me.uk macropod wrote: Hi Peter, I think it would be best to provide for two localities, since it's possible the PO Box is in a different locality from the street address (my own is). Hopefully the OP has such fields in the Excel file. Assuming that is so: «Name»/{IF«POBox»= "" "«StreeAddr»/«StreetCity» «State» «Country» «StreetZip»" "«POBox»/«POCity» «State» «Country» «POZip»"} The field brace pairs (ie '{ }') for the above example are created via Ctrl-F9 - they can't be typed or copied & pasted from this message. Ditto the chevrons (ie '« »') - they're part of the actual mergefields, which can be inserted from the mailmerge toolbar. |
#5
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Very difficult mailmerge question (ExcelWord)
Hello Peter and Macropod, that is very helpful, thank you. I have almost got the right result, I need just to get the final bits of formatting right, and also I would also like to better understand the process which I will if you'd be kind enough to answer my questions below. Could you tell me what role the quote marks ("") have? please. Sometimes there are two sets, sometimes only one. Are the forward slash signs for where paragraph returns should go? And thanks very much for what you've explained already. This is really great. "Peter Jamieson" wrote: Yes, I see what you mean... Peter Jamieson http://tips.pjmsn.me.uk macropod wrote: Hi Peter, I think it would be best to provide for two localities, since it's possible the PO Box is in a different locality from the street address (my own is). Hopefully the OP has such fields in the Excel file. Assuming that is so: «Name»/{IF«POBox»= "" "«StreeAddr»/«StreetCity» «State» «Country» «StreetZip»" "«POBox»/«POCity» «State» «Country» «POZip»"} The field brace pairs (ie '{ }') for the above example are created via Ctrl-F9 - they can't be typed or copied & pasted from this message. Ditto the chevrons (ie '« »') - they're part of the actual mergefields, which can be inserted from the mailmerge toolbar. |
#6
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Very difficult mailmerge question (ExcelWord)
Hi Marbetu,
The double quotes are always used in pairs, to denote the boundaries of each expression. Sometimes, where there are no spaces in an expression, the double quotes can be dispensed with. As for the forward slashes, yes, they're to indicate paragraph marks or line breaks. When coding my example with paragraph breaks, you'd actually see: «Name»¶ {IF«POBox»= "" "«StreeAddr»¶ «StreetCity» «State» «Country» «StreetZip»" "«POBox»¶ «POCity» «State» «Country» «POZip»"} -- Cheers macropod [Microsoft MVP - Word] "Marbetu" wrote in message ... Hello Peter and Macropod, that is very helpful, thank you. I have almost got the right result, I need just to get the final bits of formatting right, and also I would also like to better understand the process which I will if you'd be kind enough to answer my questions below. Could you tell me what role the quote marks ("") have? please. Sometimes there are two sets, sometimes only one. Are the forward slash signs for where paragraph returns should go? And thanks very much for what you've explained already. This is really great. "Peter Jamieson" wrote: Yes, I see what you mean... Peter Jamieson http://tips.pjmsn.me.uk macropod wrote: Hi Peter, I think it would be best to provide for two localities, since it's possible the PO Box is in a different locality from the street address (my own is). Hopefully the OP has such fields in the Excel file. Assuming that is so: «Name»/{IF«POBox»= "" "«StreeAddr»/«StreetCity» «State» «Country» «StreetZip»" "«POBox»/«POCity» «State» «Country» «POZip»"} The field brace pairs (ie '{ }') for the above example are created via Ctrl-F9 - they can't be typed or copied & pasted from this message. Ditto the chevrons (ie '« »') - they're part of the actual mergefields, which can be inserted from the mailmerge toolbar. |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
excel--to-excel linked cells not updated in word mailmerge | Mailmerge | |||
Word Mailmerge Question | Mailmerge | |||
mailmerge using Word/Excel 500.00 in Excel shows as 500 nt 500.00 | Mailmerge | |||
Word mailmerge question | Mailmerge | |||
Another mailmerge from Excel question | Mailmerge |