M
Martin Los
I want to restrict the Objects in the Inbox with 3
criteria:
1. The Inbox object should NOT come from any of the
following 3 senders ("(e-mail address removed)", (e-mail address removed)"
or (e-mail address removed)");
2. The object needs be received before a certain date and
time (for example before June 28th, 11:00 PM)
3. The object needs to be a MailItem (so ReportItems,
AppointMentItems etc. should be excluded from the restrict
event and NOT be counted).
Questions:
I. How do I construct the Condition to Restrict the Inbox
Items to the 3 criteria?
For example:
strCondition = [ReceivedTime] >= "28/06/2004 11:00 PM" AND
[SenderName] <> ArraySendername(i) AND [Class]
= "olMailItem" ???
II. Can criterium 3 be put into the strCondition? Outlook
help say it cannot. Would that mean using a select case
statement AFTER having done the Restrict? For example:
For each myItem in myRestrictedItems
Select Case TypeName(myItem)
Case "MailItem"
i = i + 1
Else Case
MsgBox "This restricted item is NOT a MailItem"
End Select
Next
TIA
Martin
criteria:
1. The Inbox object should NOT come from any of the
following 3 senders ("(e-mail address removed)", (e-mail address removed)"
or (e-mail address removed)");
2. The object needs be received before a certain date and
time (for example before June 28th, 11:00 PM)
3. The object needs to be a MailItem (so ReportItems,
AppointMentItems etc. should be excluded from the restrict
event and NOT be counted).
Questions:
I. How do I construct the Condition to Restrict the Inbox
Items to the 3 criteria?
For example:
strCondition = [ReceivedTime] >= "28/06/2004 11:00 PM" AND
[SenderName] <> ArraySendername(i) AND [Class]
= "olMailItem" ???
II. Can criterium 3 be put into the strCondition? Outlook
help say it cannot. Would that mean using a select case
statement AFTER having done the Restrict? For example:
For each myItem in myRestrictedItems
Select Case TypeName(myItem)
Case "MailItem"
i = i + 1
Else Case
MsgBox "This restricted item is NOT a MailItem"
End Select
Next
TIA
Martin