Find messages in multiple inbo for Outlook 2003

  • Thread starter Thread starter Andrey_R
  • Start date Start date
A

Andrey_R

Hi! I receive massages in multiple inbox whith different address. I need
check this massages simultaneously. This code correctly work whith inbox
single address. What must I modify?

Public WithEvents srchResults As Outlook.Results
Public srch As Outlook.Search
Dim sFromCondition As String
Dim sCondition As String

sFromCondition = "(NOT urn:schemas:httpmail:from like '%" +
GetEntryAddress(anApplication.Session.CurrentUser.AddressEntry) + "%') AND "
+ "(urn:schemas:httpmail:subject LIKE '%" +
AA_Actions_StrReceive + "%')"
sCondition = sFromCondition
Set srch = anApplication.AdvancedSearch("'//" +
anApplication.Session.GetDefaultFolder(olFolderInbox).Parent.Name + "'", _
sCondition, True)
If Len(sLastStartCondition) > 0 Then sCondition = sLastStartCondition + "
AND " + sFromCondition

Set srchResults = srch.Results
 
Back
Top