WD2000: Blank Lines Not Suppressed with AddressLayout AutoText

ID: Q209752


The information in this article applies to:
  • Microsoft Word 2000


SYMPTOMS

When you create an envelope in Microsoft Word 2000, and use a personal AutoText entry called AddressLayout and select a contact from your Personal Address Book that contains an empty field, a blank line may appear in the result rather than being suppressed.

For example, if you have defined an AutoText entry called AddressLayout that contains the following predefined address properties:

<PR_GIVEN_NAME> <PR_SURNAME>
<PR_COMPANY_NAME>
<PR_STREET_ADDRESS>
<PR_LOCALITY>, <PR_STATE_OR_PROVINCE> <PR_POSTAL_CODE>
and your contact has an empty Company Name field, the result contains a blank line instead of the Company Name and looks similar to this:
Amy Jones

1 Main St.
Anytown, WA 12345


CAUSE

Word is not using a conditional statement to evaluate whether blank lines exist in the Personal Address Book and is not suppressing the blank lines in the result.


RESOLUTION

To suppress a blank line when a field, such as the Company Name, is blank, write a statement that evaluates whether the field is empty and suppresses the blank line if the field is empty.

In the following example, brace characters and soft carriage returns are used to evaluate and suppress the blank lines from your result.

Replace your existing AddressLayout AutoText entry with a statement that looks similar to the following:

NOTE: Press SHIFT+ENTER rather than ENTER after each line of the address except the last line.

<PR_GIVEN_NAME> <PR_SURNAME>
{{<PR_COMPANY_NAME>
}{<PR_STREET_ADDRESS>
}<PR_LOCALITY> | {<PR_STREET_ADDRESS>
}<PR_LOCALITY>}, <PR_STATE_OR_PROVINCE> <PR_POSTAL_CODE>


STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article.


MORE INFORMATION

For additional information about modifying the layout of an address by using the AddressLayout AutoText entry, please click the article number(s) below to view the article(s) in the Microsoft Knowledge Base:

Q212345 WD2000: How to Modify the Layout of an Address Book Entry

Additional query words: merging pab

Keywords : kbinterop kbdta kbemail wd2000
Version : WINDOWS:2000
Platform : WINDOWS
Issue type : kbbug


Last Reviewed: September 10, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.