Re: Outlook Address fields in Word

From: Graham Mayor (gmayor_at_NOSPAMmvps.org)
Date: 05/26/04


Date: Wed, 26 May 2004 16:55:22 +0100

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
<>>< ><<> ><<> <>>< ><<> <>>< <>><
Stephen Glynn wrote:
> 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


Relevant Pages

  • Re: Word closing down
    ... Graham Mayor - Word MVP ... Word MVP web site http://word.mvps.org ... emptied the Template folder (including the subfolders Document Themes ...
    (microsoft.public.word.docmanagement)
  • Re: Run one macro from another and edit filenames for PDF printing
    ... Graham Mayor - Word MVP ... Word MVP web site http://word.mvps.org ... screenshot of how you have your PDF driver setup? ...
    (microsoft.public.word.vba.general)
  • Re: spell check error
    ... Graham Mayor - Word MVP ... Word MVP web site http://word.mvps.org ... spelling errors in this document only" box | OK. ...
    (microsoft.public.word.docmanagement)
  • Re: Macros to add a row in a word table
    ... Graham Mayor - Word MVP ... Word MVP web site http://word.mvps.org ... from the cell in which the Word formula field is placed. ...
    (microsoft.public.word.vba.general)
  • Re: Word closing down
    ... Graham Mayor - Word MVP ... Word MVP web site http://word.mvps.org ... By opening without templates, I ...
    (microsoft.public.word.docmanagement)