A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Sender and recipient criteria in AdvancedSearch not working



 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old February 1st 06, 04:25 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Sender and recipient criteria in AdvancedSearch not working

For the sender's address, use http://schemas.microsoft.com/mapi/proptag/0x0065001f (easily found by using the Filter dialog for an Outlook view and checking the SQL tab.

I've never found any analogous property for the recipient address, probably because there can be multiple recipients. Looking at a search folder with MFCMAPI or Outlook Spy is instructive in this area; the search rules that it uses for a "Send To = " type search are quite complex.

urn:schemas:httpmail:displayto and urn:schemas:httpmail:displaycc will get you the display names, though.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx


wrote in message oups.com...
I have tested this in VBA and in VB.NET and can not get it to work. I
am using AdvancedSearch and would like to specify a criteria based on
the sender's email address and the recipient's email address (not
necessarily at the same time, and not their display names but their
actual email addresses) . I have tried the fields:

urn:schemas:httpmail:to
urn:schemas:httpmail:sender
urn:schemas:httpmail:fromemail
urn:schemas:httpmail:toemail
urn:schemas:mailheader:to
urn:schemas:mailheader:sender
urn:schemas:mailheader:fromemail
urn:schemas:mailheader:toemail
urn:schemas:mailheader:mailheader-from


I get no search results using any of these fields. Some of these are
from MSDN's documentation, others were suggested by people in Usenet.
I have found another post from over a year ago with the similar
problem, but saw no resolution.

Can this be done?

Thank you for any help.

- Matt

 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
can i group emails by sender & by number of items for each sender baffled_by_tech Outlook - Using Contacts 2 March 5th 06 08:27 PM
Ability to add members to distributions by company, other criteria JohnH Outlook - Using Contacts 4 February 17th 06 03:31 PM
"Only 0 recipient allowed for sender ''" ?? Capricorn Outlook - General Queries 2 February 14th 06 08:16 AM
Junk mail: How to create a button for "Add sender to blocked sender list" Nananana Outlook - General Queries 2 February 2nd 06 12:37 PM
AdvancedSearch Serg Flic Outlook and VBA 1 January 10th 06 03:17 PM


All times are GMT +1. The time now is 10:39 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.