• Another address book question (Word 2000 SR-1)

    Home » Forums » AskWoody support » Productivity software by function » MS Word and word processing help » Another address book question (Word 2000 SR-1)

    Author
    Topic
    #362794

    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?

    Viewing 0 reply threads
    Author
    Replies
    • #551939

      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.

      Sub InsertAddressFromOutlook()
      Dim strCode, strAddress As String
      Dim iDoubleCR As Integer
      
      'Set up the formatting codes in strCode
      strCode = "" & vbCr
      strCode = strCode & "" & vbCr
      strCode = strCode & "" & vbCr
      strCode = strCode & ",  " & vbCr
      strCode = strCode & "" & 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
      • #552713

        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:

        Attention: {
        
        }{
        }{
        }{,  }

        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.

    Viewing 0 reply threads
    Reply To: Another address book question (Word 2000 SR-1)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: