How to find an Outlook email by the sender’s email address

1153125 pts.
Tags:
Microsoft Outlook 2010
syntax
I have an Outlook 2010 add-on and I'm trying to find an item in a folder that was sent by a given address. Here's my code so far:
MailItem FindEmailFromSender(MAPIFolder folder, string emailAddress)
{
    string filter = "[sender] = '" + emailAddress + "'"; // This filter is wrong.
    return folder.Items.Find(filter) as MailItem;
}
I'm having trouble finding the correct syntax. Can someone help me?
0

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: