PC Review


Reply
Thread Tools Rate Thread

AdvancedSearch and recipients email address

 
 
DaveSam
Guest
Posts: n/a
 
      27th Jun 2005
Using the AdvancedSearch object, I cannot find a way to search for a
string in the recipients email address. I have used
urn:schemas:httpmail:displayto, but this is only the Display name, not
necessarily the email address.

When I try to use urn:schemas:httpmail:to or urn:schemas:mailheader:to,
no matter what I put in the search string, no results are returned.

I have done this both in Outlook 2003 VBA and in VS 2003 c#. Both
result in the exact same behavior.

The scenario is:

Allow the user to input any part of an email address and be able to
find emails that were sent to anyone with that string in their address.
Displayname works if the email address is part of the DisplayName
field, however this is not always the case.

I also tried using Restrict, but without the ability to use wildcards
or Contains, it won't work for them.

Any help greatly appreciated.

Thanks,

Dave

 
Reply With Quote
 
 
 
 
Ken Slovak - [MVP - Outlook]
Guest
Posts: n/a
 
      28th Jun 2005
Try using this:

urn:schemas:httpmail:displayto

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"DaveSam" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Using the AdvancedSearch object, I cannot find a way to search for a
> string in the recipients email address. I have used
> urn:schemas:httpmail:displayto, but this is only the Display name, not
> necessarily the email address.
>
> When I try to use urn:schemas:httpmail:to or urn:schemas:mailheader:to,
> no matter what I put in the search string, no results are returned.
>
> I have done this both in Outlook 2003 VBA and in VS 2003 c#. Both
> result in the exact same behavior.
>
> The scenario is:
>
> Allow the user to input any part of an email address and be able to
> find emails that were sent to anyone with that string in their address.
> Displayname works if the email address is part of the DisplayName
> field, however this is not always the case.
>
> I also tried using Restrict, but without the ability to use wildcards
> or Contains, it won't work for them.
>
> Any help greatly appreciated.
>
> Thanks,
>
> Dave
>


 
Reply With Quote
 
DaveSam
Guest
Posts: n/a
 
      28th Jun 2005
Thanks for the effort, Ken, but I did mention why that won't work in
the first paragraph of my post.

If you have information about using "displayto" in some fashion that
will give me the users email address instead of their display name, I
am all ears.

Thanks anyway.
Dave

 
Reply With Quote
 
Sue Mosher [MVP-Outlook]
Guest
Posts: n/a
 
      28th Jun 2005
Try using http://schemas.microsoft.com/mapi/proptag/0x0065001f to search based on address.
--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx


"DaveSam" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
> Using the AdvancedSearch object, I cannot find a way to search for a
> string in the recipients email address. he I have used
> urn:schemas:httpmail:displayto, but this is only the Display name, not
> necessarily the email address.
>
> When I try to use urn:schemas:httpmail:to or urn:schemas:mailheader:to,
> no matter what I put in the search string, no results are returned.
>
> I have done this both in Outlook 2003 VBA and in VS 2003 c#. Both
> result in the exact same behavior.
>
> The scenario is:
>
> Allow the user to input any part of an email address and be able to
> find emails that were sent to anyone with that string in their address.
> Displayname works if the email address is part of the DisplayName
> field, however this is not always the case.
>
> I also tried using Restrict, but without the ability to use wildcards
> or Contains, it won't work for them.
>
> Any help greatly appreciated.
>
> Thanks,
>
> Dave
>

 
Reply With Quote
 
DaveSam
Guest
Posts: n/a
 
      30th Jun 2005
Sue,

I thought I saw another post from you referencing that tag, but in
reference to the Senders email address. And from my experimenting, I
think that it is the senders email, not the recipients.

I took your info, though, and using DC ExchangeInspector, started
poking around. No luck, yet, though there is a tag, 0x1042001E, that
looks promising, but only if the person isn't a contact - at least that
is how it appears in my early testing.

Perhaps Outlook, when using the Advanced Find feature, uses the built
in contact information if the recipient is in one of the contacts
folders???

If you have any additional info, I would appreciate it - this is
starting to get to me

Thanks,

Dave

 
Reply With Quote
 
Sue Mosher [MVP-Outlook]
Guest
Posts: n/a
 
      30th Jun 2005
You're right -- it is the sender's address. Somehow I'd missed that you were trying to search for the recipient's address. Can you refresh my memory, since it's not quoted below, on what you're trying to do?

Based on what I can see with MFCMAPI, Advanced Find and search folders search the Recipients table on each message using the MAPI property PR_EMAIL_ADDRESS (0x3003001E) as well as the display name. In other words, they're doing a "SubObject" search, rather than searching properties you can invoke directly in a DASL query.
--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx



"DaveSam" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
> Sue,
>
> I thought I saw another post from you referencing that tag, but in
> reference to the Senders email address. And from my experimenting, I
> think that it is the senders email, not the recipients.
>
> I took your info, though, and using DC ExchangeInspector, started
> poking around. No luck, yet, though there is a tag, 0x1042001E, that
> looks promising, but only if the person isn't a contact - at least that
> is how it appears in my early testing.
>
> Perhaps Outlook, when using the Advanced Find feature, uses the built
> in contact information if the recipient is in one of the contacts
> folders???
>
> If you have any additional info, I would appreciate it - this is
> starting to get to me
>
> Thanks,
>
> Dave
>

 
Reply With Quote
 
DaveSam
Guest
Posts: n/a
 
      30th Jun 2005
Sure, Sue - here's the original text:
-----------------------
Using the AdvancedSearch object, I cannot find a way to search for a
string in the recipients email address. I have used
urn:schemas:httpmail:displayto*, but this is only the Display name,
not
necessarily the email address.


When I try to use urn:schemas:httpmail:to or urn:schemas:mailheader:to,

no matter what I put in the search string, no results are returned.


I have done this both in Outlook 2003 VBA and in VS 2003 c#. Both
result in the exact same behavior.


The scenario is:


Allow the user to input any part of an email address and be able to
find emails that were sent to anyone with that string in their address.

Displayname works if the email address is part of the DisplayName
field, however this is not always the case.


I also tried using Restrict, but without the ability to use wildcards
or Contains, it won't work for them.

---------------------

So, any ideas on how to accomplish a "subobject" search? I haven't had
a chance to start thinking about it yet, but a shove in the right
direction would be appreciated!

I am using c# to build the project and have it almost finished. The
results of the search are sorted and then pushed to a Word document in
table format for easy reading and printing.

Thanks again,

Dave.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
I just don't want other recipients seeing everyone's email address Needshelp Microsoft Outlook Discussion 9 23rd Feb 2009 12:30 AM
Recipients email address VebKol Microsoft Outlook VBA Programming 8 1st Feb 2009 06:22 PM
Remove an email address from suggested email recipients in Outlook =?Utf-8?B?ZA==?= Microsoft Word Document Management 1 2nd Apr 2006 08:30 PM
Change my email address (for recipients) =?Utf-8?B?SmltbXk=?= Microsoft Outlook Discussion 1 15th Jun 2005 11:37 AM
send email with showing email address of all recipients ? scott Microsoft Outlook Discussion 2 27th Jul 2004 01:28 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:50 AM.