set flags according to age of message

A

axtens

I would like to have a macro which I could run on a set of selected
messages. The macro would look at the receive date and set flags
according to whether it came in yesterday, day before etc.

Is there anything out there like that?

If not, I can script it myself but I need some pointers.


Regards,
Bruce.
 
M

Michael Bauer

Am 27 Feb 2006 00:30:24 -0800 schrieb axtens:

Bruce, you can loop per For Each through the ActiveExplorer.Selection
collection.

For e-mails check each item´s ReceivedTime property:

Select Case DateDiff("d", oMail.ReceivedTime, Date, vbMonday,
vbFirstFourDays)
Case 0: received today
Case 1: ... yesterday
'etc.
End Select

Then you can set the item´s FlagIcon property.
 
Top