如何利用VBA 通过特定的 subject 查找outlook 发送的时间
答案:2 悬赏:40 手机版
解决时间 2021-02-07 21:27
- 提问者网友:沉默菋噵
- 2021-02-07 17:55
如何利用VBA 通过特定的 subject 查找outlook 发送的时间
最佳答案
- 五星知识达人网友:千杯敬自由
- 2021-02-07 19:19
Sub test()
Dim myNameSpace As NameSpace
Dim myitem As MailItem
Set olapp = ThisOutlookSession
Set myNameSpace = olapp.GetNamespace("MAPI")
Dim str As String
On Error Resume Next
For Each fldFolder In myNameSpace.Folders
For Each subFolder In fldFolder.Folders
If (subFolder.Name = "已发送邮件") Then
For Each myitem In subFolder.Items
If InStr(myitem.Subject, "你的subject") Then
MsgBox myitem.CreationTime
End If
Next
End If
Next
Next
End Sub
Dim myNameSpace As NameSpace
Dim myitem As MailItem
Set olapp = ThisOutlookSession
Set myNameSpace = olapp.GetNamespace("MAPI")
Dim str As String
On Error Resume Next
For Each fldFolder In myNameSpace.Folders
For Each subFolder In fldFolder.Folders
If (subFolder.Name = "已发送邮件") Then
For Each myitem In subFolder.Items
If InStr(myitem.Subject, "你的subject") Then
MsgBox myitem.CreationTime
End If
Next
End If
Next
Next
End Sub
全部回答
- 1楼网友:笑迎怀羞
- 2021-02-07 20:14
期待看到有用的回答!
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯