Outlook Address fields in Word

  • Thread starter Thread starter Stephen Glynn
  • Start date Start date
S

Stephen Glynn

Thanks to Doug Robbins and Greg Mayor for their advice about my
"Envelopes and Labels" problem.

I'm almost there, but still having difficulty.

For my autotext AddressLayout I'm using

<PR_DISPLAY_NAME>
{{<PR_COMPANY_NAME>}{{<PR_STREET_ADDRESS>
<PR_LOCALITY>, <PR_STATE_OR_PROVINCE> <PR_POSTAL_CODE>}}
{<PR_COUNTRY>}
| <PR_POSTAL_ADDRESS>

which works fine if there isn't a company name but, if there is, it runs
the COMPANY_NAME and STREET_ADDRESS together on one line.

If, however, I use

<PR_DISPLAY_NAME>
{{<PR_COMPANY_NAME>}
{{<PR_STREET_ADDRESS>
<PR_LOCALITY>, <PR_STATE_OR_PROVINCE> <PR_POSTAL_CODE>}}
{<PR_COUNTRY>}
| <PR_POSTAL_ADDRESS>

It works fine if there is a COMPANY_NAME. However I get a blank line
between the DISPLAY_NAME and the STREET_ADDRESS if there isn't a
COMPANY_NAME.

I'm clearly making an obvious mistake but I can't see what it is.

TIA.

Steve
 
You are getting yourself tied in knots with the {} separators which mark
where the fields start and end. These are not true field boundaries as set
by CTRL+F9. They are typed from the keyboard and are used only to omit the
blank lines that would result from a missing field. They are used in pairs.

Where fields will not be missing, you can leave them out. The following
should do the trick.

{<PR_DISPLAY_NAME>
}{<PR_COMPANY_NAME>
}{<PR_STREET_ADDRESS>
}<PR_LOCALITY>, <PR_STATE_OR_PROVINCE> <PR_POSTAL_CODE>
<PR_COUNTRY>


There is a potential for conflict with display name and company name -
you'll get both where display name and company name are the same.

I personally use

{<PR_GIVEN_NAME> <PR_SURNAME>
}{<PR_COMPANY_NAME>
}{<PR_POSTAL_ADDRESS>}

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><
Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site www.mvps.org/word
<>>< ><<> ><<> <>>< ><<> <>>< <>><
 
Back
Top