PC Review


Reply
Thread Tools Rate Thread

ADSL - filter by email address to

 
 
news.microsoft.com
Guest
Posts: n/a
 
      2nd Nov 2009

I'm having a problem filtering the sent items folder by
"urn:schemas:httpmail:to" LIKE '%emailaddress%' ... the search always
returns nothing. Same is true for "urn:schemas:mailheader:to" LIKE
'%emailaddress%'. I would use the displayto property but it is specific to
how an individual chooses to display a mail address unlike the email
address.

Any help in obtaining a filter to provide a list of emails sent to an
individual by email address would be appreciated.

Thanks


 
Reply With Quote
 
 
 
 
Michael Bauer [MVP - Outlook]
Guest
Posts: n/a
 
      3rd Nov 2009

Have your tried this:

urn:schemas:httpmail:displayto" LIKE '%emailaddress%'

--
Best regards
Michael Bauer - MVP Outlook

: Outlook Categories? Category Manager Is Your Tool
: VBOffice Reporter for Data Analysis & Reporting
: <http://www.vboffice.net/product.html?pub=6&lang=en>


Am Mon, 2 Nov 2009 16:00:08 -0600 schrieb news.microsoft.com:

> I'm having a problem filtering the sent items folder by
> "urn:schemas:httpmail:to" LIKE '%emailaddress%' ... the search always
> returns nothing. Same is true for "urn:schemas:mailheader:to" LIKE
> '%emailaddress%'. I would use the displayto property but it is specific

to
> how an individual chooses to display a mail address unlike the email
> address.
>
> Any help in obtaining a filter to provide a list of emails sent to an
> individual by email address would be appreciated.
>
> Thanks

 
Reply With Quote
 
Randall
Guest
Posts: n/a
 
      3rd Nov 2009
Yes. As I mentioned in my note this only looks at the display name which
can be anything and is not related to the actual email address.

What I am looking to do is this. Given an email address find all
correspondences to this email address.

Thanks

"Michael Bauer [MVP - Outlook]" <(E-Mail Removed)> wrote in message
news:10mr26ztm0gb2$.1xgb3entak4nm$.(E-Mail Removed)...
>
> Have your tried this:
>
> urn:schemas:httpmail:displayto" LIKE '%emailaddress%'
>
> --
> Best regards
> Michael Bauer - MVP Outlook
>
> : Outlook Categories? Category Manager Is Your Tool
> : VBOffice Reporter for Data Analysis & Reporting
> : <http://www.vboffice.net/product.html?pub=6&lang=en>
>
>
> Am Mon, 2 Nov 2009 16:00:08 -0600 schrieb news.microsoft.com:
>
>> I'm having a problem filtering the sent items folder by
>> "urn:schemas:httpmail:to" LIKE '%emailaddress%' ... the search always
>> returns nothing. Same is true for "urn:schemas:mailheader:to" LIKE
>> '%emailaddress%'. I would use the displayto property but it is specific

> to
>> how an individual chooses to display a mail address unlike the email
>> address.
>>
>> Any help in obtaining a filter to provide a list of emails sent to an
>> individual by email address would be appreciated.
>>
>> Thanks



 
Reply With Quote
 
Sue Mosher [MVP]
Guest
Posts: n/a
 
      3rd Nov 2009
Just using the built-in view Filter dialog and its SQL tab, I came up with
this in Outlook 2007:

("http://schemas.microsoft.com/mapi/proptag/0x0e04001f" CI_STARTSWITH
'@gmail.com' OR "http://schemas.microsoft.com/mapi/proptag/0x0e03001f"
CI_STARTSWITH '@gmail.com')

Odd that it would be CI_STARTSWITH instead of CI_PHRASEMATCH, but that's
what the SQL tab had. And the view showed all the gmail addresses,
regardless of whether that string was in the display name.

Then I modified it to use LIKE in case it's an earlier version or unindexed,
but that returned only those items that had @gmail.com in the display name.

("http://schemas.microsoft.com/mapi/proptag/0x0e04001f" LIKE
'%@gmail.com%' OR "http://schemas.microsoft.com/mapi/proptag/0x0e03001f"
LIKE '%@gmail.com%')

These results make me wonder if the underlying email address is available
only for an indexed search.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"Randall" <r_no_spam_gouge@doncar_no_spam_sys.com> wrote in message
news:O9W$(E-Mail Removed)...
> Yes. As I mentioned in my note this only looks at the display name which
> can be anything and is not related to the actual email address.
>
> What I am looking to do is this. Given an email address find all
> correspondences to this email address.
>
> Thanks
>
> "Michael Bauer [MVP - Outlook]" <(E-Mail Removed)> wrote in message
> news:10mr26ztm0gb2$.1xgb3entak4nm$.(E-Mail Removed)...
>>
>> Have your tried this:
>>
>> urn:schemas:httpmail:displayto" LIKE '%emailaddress%'
>>

>
>> Am Mon, 2 Nov 2009 16:00:08 -0600 schrieb news.microsoft.com:
>>
>>> I'm having a problem filtering the sent items folder by
>>> "urn:schemas:httpmail:to" LIKE '%emailaddress%' ... the search always
>>> returns nothing. Same is true for "urn:schemas:mailheader:to" LIKE
>>> '%emailaddress%'. I would use the displayto property but it is specific

>> to
>>> how an individual chooses to display a mail address unlike the email
>>> address.
>>>
>>> Any help in obtaining a filter to provide a list of emails sent to an
>>> individual by email address would be appreciated.



 
Reply With Quote
 
Randall
Guest
Posts: n/a
 
      4th Nov 2009
Thanks for the info Sue ... but when I am performing the same search it
appears to only be returning messages with the specified email address in
the to or cc fields ... and not returning those for the same email address
that only displayed a name.

Was hoping that was the answer as I was unaware that the sql was written for
searches where the sql is not explicitly provided.

One other question. Is this information, being able to filter folders, only
available where exhange is the mail sever?

Thanks in advance.


"Sue Mosher [MVP]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Just using the built-in view Filter dialog and its SQL tab, I came up with
> this in Outlook 2007:
>
> ("http://schemas.microsoft.com/mapi/proptag/0x0e04001f" CI_STARTSWITH
> '@gmail.com' OR "http://schemas.microsoft.com/mapi/proptag/0x0e03001f"
> CI_STARTSWITH '@gmail.com')
>
> Odd that it would be CI_STARTSWITH instead of CI_PHRASEMATCH, but that's
> what the SQL tab had. And the view showed all the gmail addresses,
> regardless of whether that string was in the display name.
>
> Then I modified it to use LIKE in case it's an earlier version or
> unindexed, but that returned only those items that had @gmail.com in the
> display name.
>
> ("http://schemas.microsoft.com/mapi/proptag/0x0e04001f" LIKE
> '%@gmail.com%' OR "http://schemas.microsoft.com/mapi/proptag/0x0e03001f"
> LIKE '%@gmail.com%')
>
> These results make me wonder if the underlying email address is available
> only for an indexed search.
> --
> Sue Mosher, Outlook MVP
> Author of Microsoft Outlook 2007 Programming:
> Jumpstart for Power Users and Administrators
> http://www.outlookcode.com/article.aspx?id=54
>
>
> "Randall" <r_no_spam_gouge@doncar_no_spam_sys.com> wrote in message
> news:O9W$(E-Mail Removed)...
>> Yes. As I mentioned in my note this only looks at the display name which
>> can be anything and is not related to the actual email address.
>>
>> What I am looking to do is this. Given an email address find all
>> correspondences to this email address.
>>
>> Thanks
>>
>> "Michael Bauer [MVP - Outlook]" <(E-Mail Removed)> wrote in message
>> news:10mr26ztm0gb2$.1xgb3entak4nm$.(E-Mail Removed)...
>>>
>>> Have your tried this:
>>>
>>> urn:schemas:httpmail:displayto" LIKE '%emailaddress%'
>>>

>>
>>> Am Mon, 2 Nov 2009 16:00:08 -0600 schrieb news.microsoft.com:
>>>
>>>> I'm having a problem filtering the sent items folder by
>>>> "urn:schemas:httpmail:to" LIKE '%emailaddress%' ... the search always
>>>> returns nothing. Same is true for "urn:schemas:mailheader:to" LIKE
>>>> '%emailaddress%'. I would use the displayto property but it is
>>>> specific
>>> to
>>>> how an individual chooses to display a mail address unlike the email
>>>> address.
>>>>
>>>> Any help in obtaining a filter to provide a list of emails sent to an
>>>> individual by email address would be appreciated.

>
>



 
Reply With Quote
 
Sue Mosher [MVP]
Guest
Posts: n/a
 
      4th Nov 2009
When it comes to viewing and manipulating data, Outlook generally doesn't
care what data store is involved.

Did you ever tell us your Outlook version? Which of my two search strings
did you try?
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"Randall" <r_no_spam_gouge@doncar_no_spam_sys.com> wrote in message
news:(E-Mail Removed)...
> Thanks for the info Sue ... but when I am performing the same search it
> appears to only be returning messages with the specified email address in
> the to or cc fields ... and not returning those for the same email address
> that only displayed a name.
>
> Was hoping that was the answer as I was unaware that the sql was written
> for searches where the sql is not explicitly provided.
>
> One other question. Is this information, being able to filter folders,
> only available where exhange is the mail sever?
>
> Thanks in advance.
>
>
> "Sue Mosher [MVP]" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> Just using the built-in view Filter dialog and its SQL tab, I came up
>> with this in Outlook 2007:
>>
>> ("http://schemas.microsoft.com/mapi/proptag/0x0e04001f" CI_STARTSWITH
>> '@gmail.com' OR "http://schemas.microsoft.com/mapi/proptag/0x0e03001f"
>> CI_STARTSWITH '@gmail.com')
>>
>> Odd that it would be CI_STARTSWITH instead of CI_PHRASEMATCH, but that's
>> what the SQL tab had. And the view showed all the gmail addresses,
>> regardless of whether that string was in the display name.
>>
>> Then I modified it to use LIKE in case it's an earlier version or
>> unindexed, but that returned only those items that had @gmail.com in the
>> display name.
>>
>> ("http://schemas.microsoft.com/mapi/proptag/0x0e04001f" LIKE
>> '%@gmail.com%' OR "http://schemas.microsoft.com/mapi/proptag/0x0e03001f"
>> LIKE '%@gmail.com%')
>>
>> These results make me wonder if the underlying email address is available
>> only for an indexed search.


>>
>> "Randall" <r_no_spam_gouge@doncar_no_spam_sys.com> wrote in message
>> news:O9W$(E-Mail Removed)...
>>> Yes. As I mentioned in my note this only looks at the display name
>>> which can be anything and is not related to the actual email address.
>>>
>>> What I am looking to do is this. Given an email address find all
>>> correspondences to this email address.
>>>
>>> Thanks
>>>
>>> "Michael Bauer [MVP - Outlook]" <(E-Mail Removed)> wrote in message
>>> news:10mr26ztm0gb2$.1xgb3entak4nm$.(E-Mail Removed)...
>>>>
>>>> Have your tried this:
>>>>
>>>> urn:schemas:httpmail:displayto" LIKE '%emailaddress%'
>>>>
>>>
>>>> Am Mon, 2 Nov 2009 16:00:08 -0600 schrieb news.microsoft.com:
>>>>
>>>>> I'm having a problem filtering the sent items folder by
>>>>> "urn:schemas:httpmail:to" LIKE '%emailaddress%' ... the search always
>>>>> returns nothing. Same is true for "urn:schemas:mailheader:to" LIKE
>>>>> '%emailaddress%'. I would use the displayto property but it is
>>>>> specific
>>>> to
>>>>> how an individual chooses to display a mail address unlike the email
>>>>> address.
>>>>>
>>>>> Any help in obtaining a filter to provide a list of emails sent to an
>>>>> individual by email address would be appreciated.

>>
>>

>
>



 
Reply With Quote
 
Randall
Guest
Posts: n/a
 
      4th Nov 2009
Good to see it is not dependent on the datastore.

I used the filter view in Outlook 2007, that I now know how to use, and used
the To field on the messages tab. The SQL for the query is the same as
yours and returns all mail with emailaddress in the To field and also
returns some messages (a very small fraction) of messages where the name
associated with the email address is displayed in the To field.

("http://schemas.microsoft.com/mapi/proptag/0x0e04001f" CI_STARTSWITH
'emailaddress' OR "http://schemas.microsoft.com/mapi/proptag/0x0e03001f"
CI_STARTSWITH 'emailaddress')

This returns only mail with the emailaddress in the To field
("http://schemas.microsoft.com/mapi/proptag/0x0e04001f" LIKE
'%emailaddress%' OR "http://schemas.microsoft.com/mapi/proptag/0x0e03001f"
LIKE '%emailaddress%')

I would have thought that since the email addresses are in the header of the
message that "urn:schemas:mailheader:to" would contain the string of
recipients but this comes back with no results.

I'm not sure what all is available .... but if there are alternate methods
of obtaining this list of recipients in code I would be willing to look at
doing that. Any thoughts would be appreciated.

Thanks


"Sue Mosher [MVP]" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> When it comes to viewing and manipulating data, Outlook generally doesn't
> care what data store is involved.
>
> Did you ever tell us your Outlook version? Which of my two search strings
> did you try?
> --
> Sue Mosher, Outlook MVP
> Author of Microsoft Outlook 2007 Programming:
> Jumpstart for Power Users and Administrators
> http://www.outlookcode.com/article.aspx?id=54
>
>
> "Randall" <r_no_spam_gouge@doncar_no_spam_sys.com> wrote in message
> news:(E-Mail Removed)...
>> Thanks for the info Sue ... but when I am performing the same search it
>> appears to only be returning messages with the specified email address in
>> the to or cc fields ... and not returning those for the same email
>> address that only displayed a name.
>>
>> Was hoping that was the answer as I was unaware that the sql was written
>> for searches where the sql is not explicitly provided.
>>
>> One other question. Is this information, being able to filter folders,
>> only available where exhange is the mail sever?
>>
>> Thanks in advance.
>>
>>
>> "Sue Mosher [MVP]" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>>> Just using the built-in view Filter dialog and its SQL tab, I came up
>>> with this in Outlook 2007:
>>>
>>> ("http://schemas.microsoft.com/mapi/proptag/0x0e04001f" CI_STARTSWITH
>>> '@gmail.com' OR "http://schemas.microsoft.com/mapi/proptag/0x0e03001f"
>>> CI_STARTSWITH '@gmail.com')
>>>
>>> Odd that it would be CI_STARTSWITH instead of CI_PHRASEMATCH, but that's
>>> what the SQL tab had. And the view showed all the gmail addresses,
>>> regardless of whether that string was in the display name.
>>>
>>> Then I modified it to use LIKE in case it's an earlier version or
>>> unindexed, but that returned only those items that had @gmail.com in the
>>> display name.
>>>
>>> ("http://schemas.microsoft.com/mapi/proptag/0x0e04001f" LIKE
>>> '%@gmail.com%' OR "http://schemas.microsoft.com/mapi/proptag/0x0e03001f"
>>> LIKE '%@gmail.com%')
>>>
>>> These results make me wonder if the underlying email address is
>>> available only for an indexed search.

>
>>>
>>> "Randall" <r_no_spam_gouge@doncar_no_spam_sys.com> wrote in message
>>> news:O9W$(E-Mail Removed)...
>>>> Yes. As I mentioned in my note this only looks at the display name
>>>> which can be anything and is not related to the actual email address.
>>>>
>>>> What I am looking to do is this. Given an email address find all
>>>> correspondences to this email address.
>>>>
>>>> Thanks
>>>>
>>>> "Michael Bauer [MVP - Outlook]" <(E-Mail Removed)> wrote in message
>>>> news:10mr26ztm0gb2$.1xgb3entak4nm$.(E-Mail Removed)...
>>>>>
>>>>> Have your tried this:
>>>>>
>>>>> urn:schemas:httpmail:displayto" LIKE '%emailaddress%'
>>>>>
>>>>
>>>>> Am Mon, 2 Nov 2009 16:00:08 -0600 schrieb news.microsoft.com:
>>>>>
>>>>>> I'm having a problem filtering the sent items folder by
>>>>>> "urn:schemas:httpmail:to" LIKE '%emailaddress%' ... the search always
>>>>>> returns nothing. Same is true for "urn:schemas:mailheader:to" LIKE
>>>>>> '%emailaddress%'. I would use the displayto property but it is
>>>>>> specific
>>>>> to
>>>>>> how an individual chooses to display a mail address unlike the email
>>>>>> address.
>>>>>>
>>>>>> Any help in obtaining a filter to provide a list of emails sent to an
>>>>>> individual by email address would be appreciated.
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
Sue Mosher [MVP]
Guest
Posts: n/a
 
      4th Nov 2009
Those are essentially the same results I reported, except that as far as I
could tell, with the first query, I got all messages sent to the gmail.com
domain, not just some, regardless of whether that string was in the display
name. I can't duplicate your "very small fraction" result.

Messages in your own Sent Items folder won't have any Internet headers. You
should be able to see that with Outlook Spy or MFCMAPI.exe.

The alternative is to iterate the Recipients collection for each item and
examine each Recipient.Address.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"Randall" <r_no_spam_gouge@doncar_no_spam_sys.com> wrote in message
news:(E-Mail Removed)...
> Good to see it is not dependent on the datastore.
>
> I used the filter view in Outlook 2007, that I now know how to use, and
> used the To field on the messages tab. The SQL for the query is the same
> as yours and returns all mail with emailaddress in the To field and also
> returns some messages (a very small fraction) of messages where the name
> associated with the email address is displayed in the To field.
>
> ("http://schemas.microsoft.com/mapi/proptag/0x0e04001f" CI_STARTSWITH
> 'emailaddress' OR "http://schemas.microsoft.com/mapi/proptag/0x0e03001f"
> CI_STARTSWITH 'emailaddress')
>
> This returns only mail with the emailaddress in the To field
> ("http://schemas.microsoft.com/mapi/proptag/0x0e04001f" LIKE
> '%emailaddress%' OR "http://schemas.microsoft.com/mapi/proptag/0x0e03001f"
> LIKE '%emailaddress%')
>
> I would have thought that since the email addresses are in the header of
> the message that "urn:schemas:mailheader:to" would contain the string of
> recipients but this comes back with no results.
>
> I'm not sure what all is available .... but if there are alternate methods
> of obtaining this list of recipients in code I would be willing to look at
> doing that. Any thoughts would be appreciated.
>
> Thanks
>
>
> "Sue Mosher [MVP]" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
>> When it comes to viewing and manipulating data, Outlook generally doesn't
>> care what data store is involved.
>>
>> Did you ever tell us your Outlook version? Which of my two search strings
>> did you try?
>>
>> "Randall" <r_no_spam_gouge@doncar_no_spam_sys.com> wrote in message
>> news:(E-Mail Removed)...
>>> Thanks for the info Sue ... but when I am performing the same search it
>>> appears to only be returning messages with the specified email address
>>> in the to or cc fields ... and not returning those for the same email
>>> address that only displayed a name.
>>>
>>> Was hoping that was the answer as I was unaware that the sql was written
>>> for searches where the sql is not explicitly provided.
>>>
>>> One other question. Is this information, being able to filter folders,
>>> only available where exhange is the mail sever?
>>>
>>> Thanks in advance.
>>>
>>>
>>> "Sue Mosher [MVP]" <(E-Mail Removed)> wrote in message
>>> news:(E-Mail Removed)...
>>>> Just using the built-in view Filter dialog and its SQL tab, I came up
>>>> with this in Outlook 2007:
>>>>
>>>> ("http://schemas.microsoft.com/mapi/proptag/0x0e04001f"
>>>> CI_STARTSWITH '@gmail.com' OR
>>>> "http://schemas.microsoft.com/mapi/proptag/0x0e03001f" CI_STARTSWITH
>>>> '@gmail.com')
>>>>
>>>> Odd that it would be CI_STARTSWITH instead of CI_PHRASEMATCH, but
>>>> that's what the SQL tab had. And the view showed all the gmail
>>>> addresses, regardless of whether that string was in the display name.
>>>>
>>>> Then I modified it to use LIKE in case it's an earlier version or
>>>> unindexed, but that returned only those items that had @gmail.com in
>>>> the display name.
>>>>
>>>> ("http://schemas.microsoft.com/mapi/proptag/0x0e04001f" LIKE
>>>> '%@gmail.com%' OR
>>>> "http://schemas.microsoft.com/mapi/proptag/0x0e03001f" LIKE
>>>> '%@gmail.com%')
>>>>
>>>> These results make me wonder if the underlying email address is
>>>> available only for an indexed search.

>>
>>>>
>>>> "Randall" <r_no_spam_gouge@doncar_no_spam_sys.com> wrote in message
>>>> news:O9W$(E-Mail Removed)...
>>>>> Yes. As I mentioned in my note this only looks at the display name
>>>>> which can be anything and is not related to the actual email address.
>>>>>
>>>>> What I am looking to do is this. Given an email address find all
>>>>> correspondences to this email address.
>>>>>
>>>>> Thanks
>>>>>
>>>>> "Michael Bauer [MVP - Outlook]" <(E-Mail Removed)> wrote in message
>>>>> news:10mr26ztm0gb2$.1xgb3entak4nm$.(E-Mail Removed)...
>>>>>>
>>>>>> Have your tried this:
>>>>>>
>>>>>> urn:schemas:httpmail:displayto" LIKE '%emailaddress%'
>>>>>>
>>>>>
>>>>>> Am Mon, 2 Nov 2009 16:00:08 -0600 schrieb news.microsoft.com:
>>>>>>
>>>>>>> I'm having a problem filtering the sent items folder by
>>>>>>> "urn:schemas:httpmail:to" LIKE '%emailaddress%' ... the search
>>>>>>> always
>>>>>>> returns nothing. Same is true for "urn:schemas:mailheader:to" LIKE
>>>>>>> '%emailaddress%'. I would use the displayto property but it is
>>>>>>> specific
>>>>>> to
>>>>>>> how an individual chooses to display a mail address unlike the email
>>>>>>> address.
>>>>>>>
>>>>>>> Any help in obtaining a filter to provide a list of emails sent to
>>>>>>> an
>>>>>>> individual by email address would be appreciated.



 
Reply With Quote
 
Randall
Guest
Posts: n/a
 
      4th Nov 2009

Thanks for the help Sue. I'll look at the recipients collection.

"Sue Mosher [MVP]" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Those are essentially the same results I reported, except that as far as I
> could tell, with the first query, I got all messages sent to the gmail.com
> domain, not just some, regardless of whether that string was in the
> display name. I can't duplicate your "very small fraction" result.
>
> Messages in your own Sent Items folder won't have any Internet headers.
> You should be able to see that with Outlook Spy or MFCMAPI.exe.
>
> The alternative is to iterate the Recipients collection for each item and
> examine each Recipient.Address.
>
> --
> Sue Mosher, Outlook MVP
> Author of Microsoft Outlook 2007 Programming:
> Jumpstart for Power Users and Administrators
> http://www.outlookcode.com/article.aspx?id=54
>
>
> "Randall" <r_no_spam_gouge@doncar_no_spam_sys.com> wrote in message
> news:(E-Mail Removed)...
>> Good to see it is not dependent on the datastore.
>>
>> I used the filter view in Outlook 2007, that I now know how to use, and
>> used the To field on the messages tab. The SQL for the query is the same
>> as yours and returns all mail with emailaddress in the To field and also
>> returns some messages (a very small fraction) of messages where the name
>> associated with the email address is displayed in the To field.
>>
>> ("http://schemas.microsoft.com/mapi/proptag/0x0e04001f" CI_STARTSWITH
>> 'emailaddress' OR "http://schemas.microsoft.com/mapi/proptag/0x0e03001f"
>> CI_STARTSWITH 'emailaddress')
>>
>> This returns only mail with the emailaddress in the To field
>> ("http://schemas.microsoft.com/mapi/proptag/0x0e04001f" LIKE
>> '%emailaddress%' OR
>> "http://schemas.microsoft.com/mapi/proptag/0x0e03001f" LIKE
>> '%emailaddress%')
>>
>> I would have thought that since the email addresses are in the header of
>> the message that "urn:schemas:mailheader:to" would contain the string of
>> recipients but this comes back with no results.
>>
>> I'm not sure what all is available .... but if there are alternate
>> methods of obtaining this list of recipients in code I would be willing
>> to look at doing that. Any thoughts would be appreciated.
>>
>> Thanks
>>
>>
>> "Sue Mosher [MVP]" <(E-Mail Removed)> wrote in message
>> news:%(E-Mail Removed)...
>>> When it comes to viewing and manipulating data, Outlook generally
>>> doesn't care what data store is involved.
>>>
>>> Did you ever tell us your Outlook version? Which of my two search
>>> strings did you try?
>>>
>>> "Randall" <r_no_spam_gouge@doncar_no_spam_sys.com> wrote in message
>>> news:(E-Mail Removed)...
>>>> Thanks for the info Sue ... but when I am performing the same search it
>>>> appears to only be returning messages with the specified email address
>>>> in the to or cc fields ... and not returning those for the same email
>>>> address that only displayed a name.
>>>>
>>>> Was hoping that was the answer as I was unaware that the sql was
>>>> written for searches where the sql is not explicitly provided.
>>>>
>>>> One other question. Is this information, being able to filter folders,
>>>> only available where exhange is the mail sever?
>>>>
>>>> Thanks in advance.
>>>>
>>>>
>>>> "Sue Mosher [MVP]" <(E-Mail Removed)> wrote in message
>>>> news:(E-Mail Removed)...
>>>>> Just using the built-in view Filter dialog and its SQL tab, I came up
>>>>> with this in Outlook 2007:
>>>>>
>>>>> ("http://schemas.microsoft.com/mapi/proptag/0x0e04001f"
>>>>> CI_STARTSWITH '@gmail.com' OR
>>>>> "http://schemas.microsoft.com/mapi/proptag/0x0e03001f" CI_STARTSWITH
>>>>> '@gmail.com')
>>>>>
>>>>> Odd that it would be CI_STARTSWITH instead of CI_PHRASEMATCH, but
>>>>> that's what the SQL tab had. And the view showed all the gmail
>>>>> addresses, regardless of whether that string was in the display name.
>>>>>
>>>>> Then I modified it to use LIKE in case it's an earlier version or
>>>>> unindexed, but that returned only those items that had @gmail.com in
>>>>> the display name.
>>>>>
>>>>> ("http://schemas.microsoft.com/mapi/proptag/0x0e04001f" LIKE
>>>>> '%@gmail.com%' OR
>>>>> "http://schemas.microsoft.com/mapi/proptag/0x0e03001f" LIKE
>>>>> '%@gmail.com%')
>>>>>
>>>>> These results make me wonder if the underlying email address is
>>>>> available only for an indexed search.
>>>
>>>>>
>>>>> "Randall" <r_no_spam_gouge@doncar_no_spam_sys.com> wrote in message
>>>>> news:O9W$(E-Mail Removed)...
>>>>>> Yes. As I mentioned in my note this only looks at the display name
>>>>>> which can be anything and is not related to the actual email address.
>>>>>>
>>>>>> What I am looking to do is this. Given an email address find all
>>>>>> correspondences to this email address.
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>>> "Michael Bauer [MVP - Outlook]" <(E-Mail Removed)> wrote in message
>>>>>> news:10mr26ztm0gb2$.1xgb3entak4nm$.(E-Mail Removed)...
>>>>>>>
>>>>>>> Have your tried this:
>>>>>>>
>>>>>>> urn:schemas:httpmail:displayto" LIKE '%emailaddress%'
>>>>>>>
>>>>>>
>>>>>>> Am Mon, 2 Nov 2009 16:00:08 -0600 schrieb news.microsoft.com:
>>>>>>>
>>>>>>>> I'm having a problem filtering the sent items folder by
>>>>>>>> "urn:schemas:httpmail:to" LIKE '%emailaddress%' ... the search
>>>>>>>> always
>>>>>>>> returns nothing. Same is true for "urn:schemas:mailheader:to" LIKE
>>>>>>>> '%emailaddress%'. I would use the displayto property but it is
>>>>>>>> specific
>>>>>>> to
>>>>>>>> how an individual chooses to display a mail address unlike the
>>>>>>>> email
>>>>>>>> address.
>>>>>>>>
>>>>>>>> Any help in obtaining a filter to provide a list of emails sent to
>>>>>>>> an
>>>>>>>> individual by email address would be appreciated.

>
>



 
Reply With Quote
 
Dmitry Streblechenko
Guest
Posts: n/a
 
      4th Nov 2009
<plug>
Redemption remaps To/CC/BCC properties specified i a query to look at the
actuall recipeint name and address instead of just PR_DISPLAY_xyz proeprty
on the message.

set Table = CreateObject("Redemption.MAPITable")
Table.Item = Application.ActiveExplorer.CurrentFolder.Items
set Recordset = Table.ExecSQL("SELECT Subject, EntryID from Folder " & _
"where (To = '(E-Mail Removed)' ) " & _
"order by LastModificationTime desc")
while not Recordset.EOF
Debug.Print(Recordset.Fields("Subject").Value & " - " &
Recordset.Fields("EntryID").Value)
Recordset.MoveNext
wend

</plug>

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Randall" <r_no_spam_gouge@doncar_no_spam_sys.com> wrote in message
news:%(E-Mail Removed)...
>
> Thanks for the help Sue. I'll look at the recipients collection.
>
> "Sue Mosher [MVP]" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
>> Those are essentially the same results I reported, except that as far as
>> I could tell, with the first query, I got all messages sent to the
>> gmail.com domain, not just some, regardless of whether that string was in
>> the display name. I can't duplicate your "very small fraction" result.
>>
>> Messages in your own Sent Items folder won't have any Internet headers.
>> You should be able to see that with Outlook Spy or MFCMAPI.exe.
>>
>> The alternative is to iterate the Recipients collection for each item and
>> examine each Recipient.Address.
>>
>> --
>> Sue Mosher, Outlook MVP
>> Author of Microsoft Outlook 2007 Programming:
>> Jumpstart for Power Users and Administrators
>> http://www.outlookcode.com/article.aspx?id=54
>>
>>
>> "Randall" <r_no_spam_gouge@doncar_no_spam_sys.com> wrote in message
>> news:(E-Mail Removed)...
>>> Good to see it is not dependent on the datastore.
>>>
>>> I used the filter view in Outlook 2007, that I now know how to use, and
>>> used the To field on the messages tab. The SQL for the query is the
>>> same as yours and returns all mail with emailaddress in the To field and
>>> also returns some messages (a very small fraction) of messages where the
>>> name associated with the email address is displayed in the To field.
>>>
>>> ("http://schemas.microsoft.com/mapi/proptag/0x0e04001f" CI_STARTSWITH
>>> 'emailaddress' OR "http://schemas.microsoft.com/mapi/proptag/0x0e03001f"
>>> CI_STARTSWITH 'emailaddress')
>>>
>>> This returns only mail with the emailaddress in the To field
>>> ("http://schemas.microsoft.com/mapi/proptag/0x0e04001f" LIKE
>>> '%emailaddress%' OR
>>> "http://schemas.microsoft.com/mapi/proptag/0x0e03001f" LIKE
>>> '%emailaddress%')
>>>
>>> I would have thought that since the email addresses are in the header of
>>> the message that "urn:schemas:mailheader:to" would contain the string of
>>> recipients but this comes back with no results.
>>>
>>> I'm not sure what all is available .... but if there are alternate
>>> methods of obtaining this list of recipients in code I would be willing
>>> to look at doing that. Any thoughts would be appreciated.
>>>
>>> Thanks
>>>
>>>
>>> "Sue Mosher [MVP]" <(E-Mail Removed)> wrote in message
>>> news:%(E-Mail Removed)...
>>>> When it comes to viewing and manipulating data, Outlook generally
>>>> doesn't care what data store is involved.
>>>>
>>>> Did you ever tell us your Outlook version? Which of my two search
>>>> strings did you try?
>>>>
>>>> "Randall" <r_no_spam_gouge@doncar_no_spam_sys.com> wrote in message
>>>> news:(E-Mail Removed)...
>>>>> Thanks for the info Sue ... but when I am performing the same search
>>>>> it appears to only be returning messages with the specified email
>>>>> address in the to or cc fields ... and not returning those for the
>>>>> same email address that only displayed a name.
>>>>>
>>>>> Was hoping that was the answer as I was unaware that the sql was
>>>>> written for searches where the sql is not explicitly provided.
>>>>>
>>>>> One other question. Is this information, being able to filter
>>>>> folders, only available where exhange is the mail sever?
>>>>>
>>>>> Thanks in advance.
>>>>>
>>>>>
>>>>> "Sue Mosher [MVP]" <(E-Mail Removed)> wrote in message
>>>>> news:(E-Mail Removed)...
>>>>>> Just using the built-in view Filter dialog and its SQL tab, I came up
>>>>>> with this in Outlook 2007:
>>>>>>
>>>>>> ("http://schemas.microsoft.com/mapi/proptag/0x0e04001f"
>>>>>> CI_STARTSWITH '@gmail.com' OR
>>>>>> "http://schemas.microsoft.com/mapi/proptag/0x0e03001f" CI_STARTSWITH
>>>>>> '@gmail.com')
>>>>>>
>>>>>> Odd that it would be CI_STARTSWITH instead of CI_PHRASEMATCH, but
>>>>>> that's what the SQL tab had. And the view showed all the gmail
>>>>>> addresses, regardless of whether that string was in the display name.
>>>>>>
>>>>>> Then I modified it to use LIKE in case it's an earlier version or
>>>>>> unindexed, but that returned only those items that had @gmail.com in
>>>>>> the display name.
>>>>>>
>>>>>> ("http://schemas.microsoft.com/mapi/proptag/0x0e04001f" LIKE
>>>>>> '%@gmail.com%' OR
>>>>>> "http://schemas.microsoft.com/mapi/proptag/0x0e03001f" LIKE
>>>>>> '%@gmail.com%')
>>>>>>
>>>>>> These results make me wonder if the underlying email address is
>>>>>> available only for an indexed search.
>>>>
>>>>>>
>>>>>> "Randall" <r_no_spam_gouge@doncar_no_spam_sys.com> wrote in message
>>>>>> news:O9W$(E-Mail Removed)...
>>>>>>> Yes. As I mentioned in my note this only looks at the display name
>>>>>>> which can be anything and is not related to the actual email
>>>>>>> address.
>>>>>>>
>>>>>>> What I am looking to do is this. Given an email address find all
>>>>>>> correspondences to this email address.
>>>>>>>
>>>>>>> Thanks
>>>>>>>
>>>>>>> "Michael Bauer [MVP - Outlook]" <(E-Mail Removed)> wrote in message
>>>>>>> news:10mr26ztm0gb2$.1xgb3entak4nm$.(E-Mail Removed)...
>>>>>>>>
>>>>>>>> Have your tried this:
>>>>>>>>
>>>>>>>> urn:schemas:httpmail:displayto" LIKE '%emailaddress%'
>>>>>>>>
>>>>>>>
>>>>>>>> Am Mon, 2 Nov 2009 16:00:08 -0600 schrieb news.microsoft.com:
>>>>>>>>
>>>>>>>>> I'm having a problem filtering the sent items folder by
>>>>>>>>> "urn:schemas:httpmail:to" LIKE '%emailaddress%' ... the search
>>>>>>>>> always
>>>>>>>>> returns nothing. Same is true for "urn:schemas:mailheader:to"
>>>>>>>>> LIKE
>>>>>>>>> '%emailaddress%'. I would use the displayto property but it is
>>>>>>>>> specific
>>>>>>>> to
>>>>>>>>> how an individual chooses to display a mail address unlike the
>>>>>>>>> email
>>>>>>>>> address.
>>>>>>>>>
>>>>>>>>> Any help in obtaining a filter to provide a list of emails sent to
>>>>>>>>> an
>>>>>>>>> individual by email address would be appreciated.

>>
>>

>
>



 
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
how to filter and count contacts with email but no address MarkB Microsoft Outlook Discussion 5 26th Mar 2010 02:51 AM
Filter to specify which account is used according to email address? Gaikokujin Kyofusho Microsoft Outlook 6 7th Apr 2008 03:57 PM
How to filter email when word is part of email address? =?Utf-8?B?RGVuZWVuIEhhcnJlbGw=?= Microsoft Outlook Discussion 7 4th Apr 2005 02:47 PM
Filter on email address John Clark Microsoft Outlook Program Addins 1 12th Dec 2003 06:48 AM
filter by email address Steven K Microsoft Outlook Discussion 1 2nd Sep 2003 08:50 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:13 AM.