Create Outlook rule which runs AFTER move mail to specific folder

20,244

No direct way using rules only. You can have server-side "move" rule, but Outlook rules don't trigger on events other than incoming/outgoing mail.

What you really can do is to create a VBA script than will trigger on new items in that particular "done" folder and mark these items as read. But this will execute on client only. Something like this (for Inbox\DONE subfolder):

Public WithEvents FolderItems As Outlook.Items

Private Sub Application_Startup()
   Set FolderItems = Session.GetDefaultFolder(olFolderInbox).Folders("DONE").Items
End Sub

Private Sub FolderItems_ItemAdd(ByVal Item As Object)
    On Error Resume Next
    If Item.UnRead Then
        Item.UnRead = False
        Item.Save
    End If
End Sub

The most complex way is to create a server-side tool that will monitor this "done" folder and periodically mark items as read, this can be done in a form of Windows Service or just a standalone script that you can run using Windows Scheduler, for instance. You can also use third-party tools for that.

Share:
20,244

Related videos on Youtube

drizzt
Author by

drizzt

Updated on September 18, 2022

Comments

  • drizzt
    drizzt over 1 year

    is there some way how to create rule for Outlook(2013) which will run after move mail to specific folder?

    Motivation: I need to have rules which moves mail from specific address to specific folder and marks it as read. Rule for this is simple, but have one BIG disadvantage: This rule must be client only - it runs only if Outlook windows app is running. And therefore on mobile device you will have all mess in inbox. So I need one server rule for moving mails to folder - DONE. And one rule for making them read - and this rule must be triggered after move of mail to folder.

    Thanks a lot

    • Admin
      Admin almost 9 years
      To clarify, you're looking for a way to run a server-side rule (move messages) followed by a client-side rule (mark as read)? And you want this to happen automatically? Without Outlook running?
    • Admin
      Admin almost 9 years
      For server-side, yes - already done. For client-side, no - rule cant run without Outlook running(I dont know how to create such rule). Main problem is triggering rule after move of mail to specific folder.
  • drizzt
    drizzt almost 9 years
    Thanks, VBA script is fine for me. Can you please give me little direction to this script?
  • drizzt
    drizzt almost 9 years
    I made it as C# addin, but basic is from you. Thanks