Results 1 to 8 of 8
  1. #1
    New Lounger
    Join Date
    Dec 2009
    Location
    Pretoria, South Africa
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Every day I receive a number of email newsletters that I read and delete. These then flood my deleted items. I would like to have these certain items (not everything) auto delete permanently out of my deleted items after say 7 days. I have looked through the forum and cannot find something similar. I am sure this is easy, yet, not sure how.

    Thanks
    Grant

  2. #2
    Administrator
    Join Date
    Mar 2001
    Location
    St Louis, Missouri, USA
    Posts
    23,592
    Thanks
    5
    Thanked 1,059 Times in 928 Posts
    Instead of deleting them, create another folder, drag the newsletters to the folder, configure the autoarchive settings for the folder to delete everything older than 7 days.

    Joe
    Joe

  3. #3
    5 Star Lounger
    Join Date
    Dec 2003
    Location
    Burrton, KS, USA
    Posts
    833
    Thanks
    0
    Thanked 2 Times in 2 Posts
    If you wish, you could also create a mail rule in outlook to put them in that folder.

    something like "all mails" from the "specified sender" are moved to the "specified folder" when "marked as read".

  4. #4
    New Lounger
    Join Date
    Dec 2009
    Location
    Pretoria, South Africa
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    This was not exactly what I had in mind, as this way i have to each time think, whether I press delete or use the mouse to drop into the selected folder. Is there a way a rule can run when I close outlook that would move certain emails according to criteria I have set from my deleted folder to this other folder?

    Thanks
    Grant

  5. #5
    New Lounger
    Join Date
    Dec 2009
    Location
    Pretoria, South Africa
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Mercyh, I like your idea, only I cannot find the "mark as read" as a criteria, but only as an action to perform -- am I missing something? Can you just go through the steps more in detail for me.

    Thanks
    Grant

  6. #6
    5 Star Lounger
    Join Date
    Dec 2003
    Location
    Burrton, KS, USA
    Posts
    833
    Thanks
    0
    Thanked 2 Times in 2 Posts
    In the rules wizard select both "from person" (the first option) and "flagged for action". In the window below double click on the blue underlined action and select "read".

    Oops, I just tested this and it doesn't work.....Now I wonder why not.....

  7. #7
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts
    I think if you are (re)moving them from the Deleted Items folder, then you probably don't care whether they were read or not. You might care only about identifying the message (e.g., by text in from, to, or subject) and perhaps filtering by date.

    But there is a catch: rules generally hook into the receipt or sending of a message, rather than the passage of time. You might need a "weekly cleanup" macro or other VBA code to take care of this. For example:

    Code:
    Sub WeeklyCleanup()
    ' Sample macro to remove selected messages from the Deleted Items folder
    
    ' Create filters
    Dim strSenderText As String, intDays As Integer
    strSenderText = "Reuters.com"   ' Delete matching senders
    intDays = 7                     ' Preserve recently sent messages
    
    ' Identify matching messages
    Dim DelItems As Outlook.Items, nukeSet As Outlook.Items
    Set DelItems = Application.GetNamespace("MAPI").GetDefaultFolder(olFolderDeletedItems).Items
    Set nukeSet = DelItems.Restrict("[SenderName]=""" & strSenderText & """ and [SentOn] < ""#" & _
        DateAdd("d", intDays * -1, Date) & "#""")
    If MsgBox("Filtered " & nukeSet.Count & " items from a total of " & DelItems.Count & _
            " items. OK to delete?", vbOKCancel + vbQuestion) = vbOK Then
        ' Delete the messages in the filtered set
        Dim lngRec As Long
        For lngRec = nukeSet.Count To 1 Step -1
            nukeSet.Item(lngRec).Delete
        Next
    End If
    
    ' Clean up object variables
    Set nukeSet = Nothing
    Set DelItems = Nothing
    End Sub
    The problem with this, at least for me, is that it seems slower than deleting interactively and I don't have the comfort of the last second "are you sure" prompt.

  8. #8
    New Lounger
    Join Date
    Dec 2009
    Location
    Pretoria, South Africa
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks jsher2000, this looks like a good start for me. I do not know vba scripting, but have often said i need to learn - maybe now is the time.

    Thanks
    Grant

Posting Permissions

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