Consulting

Results 1 to 3 of 3

Thread: Rules only after message is read

  1. #1
    VBAX Regular
    Joined
    May 2016
    Posts
    69
    Location

    Rules only after message is read

    How can I apply rules to emails, but only after the message is read?

    Example: John Doe gives me information about Dog Food, so I want John Doe's email to go to dog food folder, but first I need to double-click the message, read it, and hit the X on the top right corner (closing the email) before the program is triggered to move to a specified folder.

    Thanks

  2. #2
    VBAX Expert Logit's Avatar
    Joined
    Sep 2016
    Posts
    613
    Location
    .
    I believe this may be what you are seeking ?

    https://stackoverflow.com/questions/...ers-in-outlook

    Sub ReadMailMover()
    
    
    Set objOutlook = CreateObject("Outlook.Application")  
    Set objNamespace = objOutlook.GetNamespace("MAPI")  
    Set objFolderSrc = objNamespace.GetDefaultFolder(olFolderInbox)  
    Set objFolderDst = objFolderSrc.Parent.folders("__Reviewed")  
    
    
    Set colitems = objFolderSrc.Items  
    Set colfiltereditems = colitems.Restrict("[UnRead] = False")  
    
    
    For intMessage = colfiltereditems.Count To 1 Step -1  
    colfiltereditems(intMessage).Move objFolderDst  
    Next  
    
    
    End Sub

  3. #3
    VBAX Regular
    Joined
    May 2016
    Posts
    69
    Location
    Sort of. I don't want it to go to a reviewed folder. I just want to start creating rules right into the script to move to specific folders based on words in Subject Line or depending on who sent me an email.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •