T
Ton Strankinga
Hi,
I like to find e-mails from the inbox and sent mail box in Outlook by
restricting the search criterium to [From] and [To].
The result is, that all e-mails from the inbox are filtered correctly,
however the e-mails from the folder olFolderSentMail are not filtered at
all. In other words no match is found.
The code I am using :
Outlook.MAPIFolder oSentbox =
oNS.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderSentMail);
Outlook.Items oItems = oSentbox.Items;
Outlook.Items oRestrictedItems = (Outlook.Items) oItems.Restrict("[To] =
'"+contact+"'"); //Contact is the e-mail address
Regards,
Ton
Ton
I like to find e-mails from the inbox and sent mail box in Outlook by
restricting the search criterium to [From] and [To].
The result is, that all e-mails from the inbox are filtered correctly,
however the e-mails from the folder olFolderSentMail are not filtered at
all. In other words no match is found.
The code I am using :
Outlook.MAPIFolder oSentbox =
oNS.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderSentMail);
Outlook.Items oItems = oSentbox.Items;
Outlook.Items oRestrictedItems = (Outlook.Items) oItems.Restrict("[To] =
'"+contact+"'"); //Contact is the e-mail address
Regards,
Ton
Ton