VBA code to delete emails after x Days

后端 未结 1 1850
不思量自难忘°
不思量自难忘° 2021-02-06 18:27

I am trying to delete all emails in my inbox that are older than 90 days. I am not able to use the auto archive since it has been disabled at my office. I have some code that do

相关标签:
1条回答
  • 2021-02-06 18:42

    I was able to fix it by tweaking the code. Now the code runs just fine. I change the "m" on line 13 to a "d" and now it is deleting all older emails. Updated code Above.

    If DateDiff("d",now, Delete_Items.Item(i).ReceivedTime) > 90 Then Delete_Items.Item(i).Delete
    
    0 讨论(0)
提交回复
热议问题