Results 1 to 3 of 3
  1. #1
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Leesburg, Virginia, USA
    Posts
    618
    Thanks
    0
    Thanked 0 Times in 0 Posts

    WD 2000 Insert address

    There was an excellent article in WOW last year on how to modify the Insert Address macro so that the address that is inserted from Outlook 2000 only contains specific fields. Specifically I want to strip out the Country field. Can someone point me to the issue number that contained this information?

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

    Re: WD 2000 Insert address

    I don't recall which issue but this macro should get you started. It came from one of Woody's sources once upon a time.

    <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
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: WD 2000 Insert address

    Hi Jim:

    I think it's WOW 4.35 (and also 3.34). There is also an article on the KB here.

    Hope this helps.

Posting Permissions

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