![]() |
|
#1
|
|||
|
|||
|
Is it possible to set a rule to flag emails that are received on a day of the week?
I need to review and respond to all emails that come in on Friday and I want to ensure none slip through the cracks Thanks |
|
#2
|
||||
|
||||
|
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 |
|
#3
|
|||
|
|||
|
I am new to scripts in outlook. If possible can you provide simple step by step instructions or a place on the web with easy to follow steps
|
|
#4
|
||||
|
||||
|
The process is essentially similar to http://www.gmayor.com/installing_macro.htm
Add a module to the VBA editor (ALT+F11 - Insert > Module) and paste the code above in to it.
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
|
#5
|
|||
|
|||
|
I need to create a macro and paste the entire text you posted or just a section?
|
|
#6
|
||||
|
||||
|
The macro is the text in the code panel. Actually two macros. You don't have to create anything. Just copy and paste into a new module.
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
|
| 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 |
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 |