Find and select mail in ActiveExplorer

G

Guest

Please somebody help me to find last UnRead mail with text like "Test*" in
Subject and select it. I Found last UnRead mail by

Set objMail =
Application.GetNamespace("MAPI").GetDefaultFolder(olFolderInbox).Items.Find("([UnRead] = True)")

but could not do anything else. As I see "Like" operator there is not
functioning.
And after finding this massage, how to select it in ActiveExplorer.
 
M

Michael Bauer [MVP - Outlook]

Am Thu, 28 Sep 2006 15:42:01 -0700 schrieb Gvaram:

You´re right, the LIKE operator doesn´t work in that case. Instead you need
to iterate through all the items and check for the subject. Before that you
could sort the collection by Items.Sort for the received date and restrict
it for unread items.

But there´s no way to select the result.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.VBOffice.net --

Please somebody help me to find last UnRead mail with text like "Test*" in
Subject and select it. I Found last UnRead mail by

Set objMail =
Application.GetNamespace("MAPI").GetDefaultFolder(olFolderInbox).Items.Find("([UnRead]
= True)")
 
G

Guest

Your answer forced me to find another way to solve problem - and I found it.
I'm getting EntryID of MeilItem, so I can do many things with this mail
massage ... :)

Thank you Michael


Michael Bauer said:
Am Thu, 28 Sep 2006 15:42:01 -0700 schrieb Gvaram:

You´re right, the LIKE operator doesn´t work in that case. Instead you need
to iterate through all the items and check for the subject. Before that you
could sort the collection by Items.Sort for the received date and restrict
it for unread items.

But there´s no way to select the result.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.VBOffice.net --

Please somebody help me to find last UnRead mail with text like "Test*" in
Subject and select it. I Found last UnRead mail by

Set objMail =
Application.GetNamespace("MAPI").GetDefaultFolder(olFolderInbox).Items.Find("([UnRead]
= True)")
but could not do anything else. As I see "Like" operator there is not
functioning.
And after finding this massage, how to select it in ActiveExplorer.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top