Results 1 to 3 of 3
  1. #1
    5 Star Lounger
    Join Date
    Jul 2001
    Location
    Terneuzen, Netherlands
    Posts
    895
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Resolving email addresses in Outlook (Office 2003)

    I have an (Excel) VBA application and try to change names in a sheet by resolving them using Outlook (which gives me the initials of the person's name).

    Using:

    Set ToContact = olMailItem.Recipients.Add(Recip)
    ToContact.Resolve
    If ToContact.Resolved Then Newname = olMailItem.Recipients(1).Name

    Etc. I can get this to work. I have two questions...

    (1) This seems to resolve against my Outlook (of course) and for names that are NOT in my PAB, this works. However, as I always first resolve against my PAB, when that happens and is successful, I do NOT get the initials on Resolved contacts. The initials are visible in the properties for a person in my PAB but I don't know how to get them out. Maybe it's something like olMailItem.Recipients(1).Initials but I don't know.
    Another way is to force the resolve against the main address book in stead of my PAB (but I don't want to set that manually, the program should do that for the run)

    (2) When a name doesn't resolve, I'd like to get a prompt (as Outlook normally does) that allows me to choose the right person... For reasons I don't understand, that doesn't happen now. How do I trigger that?

    (I'm using Outlook with an Exchange server)

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Resolving email addresses in Outlook (Office 2003)

    Outlook VBA itself is rather limited. You may be able to use CDO; see for example this Sample Chapter from Programming Collaborative Web Applications with Microsoft® Exchange 2000 Server by Mindy Martin for an idea of how to list ambiguous names if a name cannot be resolved.

  3. #3
    5 Star Lounger
    Join Date
    Jul 2001
    Location
    Terneuzen, Netherlands
    Posts
    895
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Resolving email addresses in Outlook (Office 2003)

    Thanks Hans,

    I checked this out quickly but this is beyond me and a totally different approach from where I am now... I think I'll pass this time ;-(

    Erik Jan

Posting Permissions

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