none
contact RRS feed

Answers

  • try to use Session.CreateRecipient(your email) - you will get back object and from now on follow Ken's advice.
    Tuesday, December 4, 2012 10:41 AM
  • As long as a Contacts folder is enabled as an Outlook address book it should work.

    --
    Ken Slovak
    [MVP-Outlook]
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
    "DamianD" <=?utf-8?B?RGFtaWFuRA==?=> wrote in message news:bae2d984-786a-4c8c-b068-f301f9208695...
    i just checked - CreateRecipient returns valid Recipient object for email that only exists in Contacts folder - are you sure that your contacts are in default contacts folder and not some subfolder?

    Ken Slovak MVP - Outlook
    Wednesday, December 5, 2012 2:13 PM
    Moderator

All replies

  • there is both GetGlobalAddressList and AddressLists on Namespace object (Session). Is this what you wanted?
    Sunday, December 2, 2012 12:35 PM
  • actualy i want to find all mails received from specific contact.

    somtimes in the sent items, this contact is with his email address and somtimes he is with his name from the contact profile. I cant know always where the contact was saved (local or global) so i need to find his name from the contact's profile from both global and local.

    I want to do it the fast as possible.

    How can I do that?


    • Edited by redgolda Tuesday, December 4, 2012 10:04 AM
    Sunday, December 2, 2012 1:02 PM
  • When you have a reference to an item in Sent Items get the Sender property, which is an Outlook AddressEntry object. From there you can get name, address and other properties and you can call the AddressEntry.GetContact() method to get the ContactItem representing that AddressEntry if the AddressEntry is a contact. If it's a GAL entry you can use GetExchangeUser() to get an ExchangeUser object.

    --
    Ken Slovak
    [MVP-Outlook]
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
    "redgolda" <=?utf-8?B?cmVkZ29sZGE=?=> wrote in message news:a887b8ce-411a-46c8-813c-c25c08c52702...

    actualy i want to find all mails received from specific contact.

    somtimes in the sent items, this contact is with his email address and somtimes he is with his name from the contact profile. I cant know always where the contact was saved (local or global) so i need to find his name contact's profile from both global and local.

    I want to do it the fast as possible.

    How can I do that?


    Ken Slovak MVP - Outlook
    Monday, December 3, 2012 2:27 PM
    Moderator
  • I dont have a reference to an item. i have an email address and i want to check if that email address has a contact, and if he has - than what is the contact's name.

    the contact can be in global contacts and in local contacts.

    how can i do that?



    • Edited by redgolda Tuesday, December 4, 2012 10:04 AM
    Tuesday, December 4, 2012 10:02 AM
  • try to use Session.CreateRecipient(your email) - you will get back object and from now on follow Ken's advice.
    Tuesday, December 4, 2012 10:41 AM
  • i tried it, it works only with contacts from global. what about the local contacts?
    Tuesday, December 4, 2012 11:59 AM
  • i just checked - CreateRecipient returns valid Recipient object for email that only exists in Contacts folder - are you sure that your contacts are in default contacts folder and not some subfolder?
    Tuesday, December 4, 2012 12:16 PM
  • As long as a Contacts folder is enabled as an Outlook Address Book it should work.

    Ken Slovak MVP - Outlook

    Tuesday, December 4, 2012 9:09 PM
    Moderator
  • As long as a Contacts folder is enabled as an Outlook address book it should work.

    --
    Ken Slovak
    [MVP-Outlook]
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
    "DamianD" <=?utf-8?B?RGFtaWFuRA==?=> wrote in message news:bae2d984-786a-4c8c-b068-f301f9208695...
    i just checked - CreateRecipient returns valid Recipient object for email that only exists in Contacts folder - are you sure that your contacts are in default contacts folder and not some subfolder?

    Ken Slovak MVP - Outlook
    Wednesday, December 5, 2012 2:13 PM
    Moderator