Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 11-18-2016, 09:34 PM
gmayor's Avatar
gmayor gmayor is offline Automatic Flag Rule Windows 10 Automatic Flag Rule Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,138
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
 

Tags
flag, rule, settings



Similar Threads
Thread Thread Starter Forum Replies Last Post
Rule to forward email using rule to me@onenote.com anony1 OneNote 2 02-04-2023 02:39 PM
flag identical words? 21rouge Word 1 09-21-2013 08:42 AM
Automatic Flag Rule Follow-up Flag Behavior curtis.walker@sgmc.org Outlook 1 03-06-2013 08:52 AM
How Can I Flag Duplicate Date Entries? tatihulot Excel 5 11-16-2012 12:19 AM
Task closing when flag is cleared pro3carp3 Outlook 1 12-05-2011 10:21 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:06 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft