Results 1 to 4 of 4
  1. #1
    2 Star Lounger bmeacham's Avatar
    Join Date
    Jan 2001
    Location
    Austin, Texas, USA
    Posts
    191
    Thanks
    4
    Thanked 4 Times in 4 Posts

    Another address book question (Word 2000 SR-1)

    I use Word 2000 running under Windows 2000 Professional. When I go to Tools / Envelopes and Labels and click on the little address book icon to pick a different return address, the addresses from Outlook Express show up. When I pick one, the name and address appear with "United States of America" on the last line. I do not want "United States of America" to appear. I look in Outlook Express, and there is no entry in the Country field. This is only a nuisance, since I can just delete it, but is there a way to make it not happen?
    Bill Meacham
    bmeacham98 AT yahoo.com

  2. #2
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,852
    Thanks
    4
    Thanked 259 Times in 239 Posts

    Re: Another address book question (Word 2000 SR-1)

    If you use a macro to do the same thing you can customise it to your heart's content. The following is a macro that Woody published ages ago and I have modified for my own use. I don't live in the US so I have a different country to weed out. You should get the idea from the macro anyway.
    <pre>Sub InsertAddressFromOutlook()
    Dim strCode, strAddress As String
    Dim iDoubleCR As Integer

    'Set up the formatting codes in strCode
    strCode = "<PR_DISPLAY_NAME>" & vbCr
    strCode = strCode & "<PR_COMPANY_NAME>" & vbCr
    strCode = strCode & "<PR_STREET_ADDRESS>" & vbCr
    strCode = strCode & "<PR_LOCALITY>, <PR_STATE_OR_PROVINCE> <PR_POSTAL_CODE>" & vbCr
    strCode = strCode & "<PR_COUNTRY>" & vbCr

    'Let the user choose the name in Outlook
    strAddress = Application.GetAddress("", strCode, False, 1, , , True, True)
    'Strip away the final "Australia", if any
    If Right(strAddress, 10) = "Australia" & vbCr Then
    strAddress = Left(strAddress, Len(strAddress) - 10)
    End If

    'Eliminate blank lines by looking for two carriage returns in a row
    iDoubleCR = InStr(strAddress, vbCr & vbCr)
    While iDoubleCR <> 0
    strAddress = Left(strAddress, iDoubleCR - 1) & Mid(strAddress, iDoubleCR + 1)
    iDoubleCR = InStr(strAddress, vbCr & vbCr)
    Wend

    'Insert the modified address at the current insertion point
    Selection.TypeText strAddress
    End Sub</pre>

    Andrew Lockton, Chrysalis Design, Melbourne Australia

  3. #3
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Calgary, Alberta, Canada
    Posts
    283
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Another address book question (Word 2000 SR-1)

    Another alternative, which doesn't involve the use of macros, is to edit the contents of the "AddressLayout" Autotext entry. This is what dictates the layout of the address data you've selected from the Address Book.

    Essentially, you type the field codes in a blank Word document with all of the brackets and such their correct places. Then, select the new layout text, click Insert | AutoText..." title the selection "AddressLayout", and click Add. You should be prompted to overwrite the existing AddressLayout autotext entry.

    For example, my AddressLayout looks like this:

    <pre>Attention: {<PR_DISPLAY_NAME>

    }{<PR_COMPANY_NAME>
    }{<PR_STREET_ADDRESS>
    }{<PR_LOCALITY>, <PR_STATE_OR_PROVINCE> <PR_POSTAL_CODE>}</pre>


    My addresses come out looking like this:

    Attention: Keely Dunn

    Dunn LegalTech Ltd.
    123 Main Street
    Calgary, AB A1A 1A1

    The crucial elements are the round brackets at the beginning of the 2nd+ lines.

    For a comprehensive list of the field codes available to you, check MSKB article Q211424. Hope that helps.

  4. #4
    2 Star Lounger bmeacham's Avatar
    Join Date
    Jan 2001
    Location
    Austin, Texas, USA
    Posts
    191
    Thanks
    4
    Thanked 4 Times in 4 Posts

    Re: Another address book question (Word 2000 SR-1)

    Cool! Thanks, Keely.
    Bill Meacham
    bmeacham98 AT yahoo.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •