没有合适的资源?快使用搜索试试~ 我知道了~
outlook2016设置删除重复邮件方法.txt
需积分: 50 20 下载量 56 浏览量
2020-01-16
11:18:06
上传
评论
收藏 2KB TXT 举报
温馨提示
试读
2页
设置outlook删除重复邮件代码本资源针对解决outlook没有删除重复邮件功能,他可以按照文件夹进行重复邮件的删除,适用任何版本的outlook,是宏操作
资源推荐
资源详情
资源评论
Sub DelDuplicateMail() '删除重复邮件
Dim olApp As Outlook.Application
Dim fld_Inbox As Outlook.Folder
Dim objItems As Outlook.Items
Dim myItem As Object
Dim dupItem As Object
Dim i%, j%
Dim ThisSenderEmailAddress, NextSenderEmailAddress As String
Dim ThisSize, NextSize As Long
Dim ThisSentOn, NextSentOn As Date
Dim ThisBody, NextBody As String
Dim st As Object
aa = Timer
Set olApp = Outlook.Application
For Each st In Application.ActiveExplorer.Selection '选择当前邮件对应的文件夹
If TypeName(st) = "MailItem" Then
Set fld_Inbox = st.Parent
Exit For
End If
Next
If TypeName(fld_Inbox) <> "MAPIFolder" Then MsgBox "请选择有效文件夹,程序退出": Exit Sub
Set objItems = fld_Inbox.Items
If objItems.Count = 1 Then MsgBox "请选择大于 1 封邮件的文件夹,程序退出": Exit Sub
'Set objItems = objItems.Restrict("[SentOn] > '8/1/2014'"
objItems.Sort "[SentOn]", True '按日期排序
Dim olApp As Outlook.Application
Dim fld_Inbox As Outlook.Folder
Dim objItems As Outlook.Items
Dim myItem As Object
Dim dupItem As Object
Dim i%, j%
Dim ThisSenderEmailAddress, NextSenderEmailAddress As String
Dim ThisSize, NextSize As Long
Dim ThisSentOn, NextSentOn As Date
Dim ThisBody, NextBody As String
Dim st As Object
aa = Timer
Set olApp = Outlook.Application
For Each st In Application.ActiveExplorer.Selection '选择当前邮件对应的文件夹
If TypeName(st) = "MailItem" Then
Set fld_Inbox = st.Parent
Exit For
End If
Next
If TypeName(fld_Inbox) <> "MAPIFolder" Then MsgBox "请选择有效文件夹,程序退出": Exit Sub
Set objItems = fld_Inbox.Items
If objItems.Count = 1 Then MsgBox "请选择大于 1 封邮件的文件夹,程序退出": Exit Sub
'Set objItems = objItems.Restrict("[SentOn] > '8/1/2014'"
objItems.Sort "[SentOn]", True '按日期排序
资源评论
dlhf_herman
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功