Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Marbetu Marbetu is offline
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default 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   Report Post  
Posted to microsoft.public.word.mailmerge.fields
macropod[_2_] macropod[_2_] is offline
external usenet poster
 
Posts: 2,059
Default 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   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default 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   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Marbetu Marbetu is offline
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.word.mailmerge.fields
macropod[_2_] macropod[_2_] is offline
external usenet poster
 
Posts: 2,059
Default 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

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
excel--to-excel linked cells not updated in word mailmerge gijski Mailmerge 2 January 5th 07 08:00 AM
Word Mailmerge Question Amy Mailmerge 6 June 12th 06 09:12 PM
mailmerge using Word/Excel 500.00 in Excel shows as 500 nt 500.00 Switchengine Mailmerge 1 January 29th 06 07:53 PM
Word mailmerge question [email protected] Mailmerge 3 January 19th 06 06:33 PM
Another mailmerge from Excel question Paul - NottsUK Mailmerge 2 May 18th 05 10:19 AM


All times are GMT +1. The time now is 12:36 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"