View Single Post
 
Old 11-18-2016, 09:34 PM
gmayor's Avatar
gmayor gmayor is offline Windows 10 Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,137
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

You can do it with a script associated with a rule to process incoming messages. e.g. the FlagFriday macro below. I have included a macro that will enable you to test on a message in your inbox. Messages sent on Friday are flagged.

Because of Outlook security, you will almost certainly need to self certify the vba code -
http://www.gmayor.com/create_and_employ_a_digital_cert.htm

Code:
Sub TestFlag()
Dim olMsg As MailItem
    On Error Resume Next
    Set olMsg = ActiveExplorer.Selection.Item(1)
    MsgBox Weekday(olMsg.SentOn)
    FlagFriday olMsg
lbl_Exit:
    Exit Sub
End Sub

Sub FlagFriday(Item As Outlook.MailItem)
    If Weekday(Item.SentOn) = 6 Then
        Item.MarkAsTask olMarkToday
        Item.Save
    End If
lbl_Exit:
    Exit Sub
End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote