View Single Post
  #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.