【发布时间】:2020-05-16 03:01:02
【问题描述】:
如何让宏在收件箱和任何子文件夹上运行?
这仅适用于根文件夹
Set xInboxFld = Outlook.Application.Session.GetDefaultFolder(olFolderInbox)
【问题讨论】:
-
For Each Folder in xInboxFld -
这就是我解决问题的方法:
Set xInboxFld = Outlook.Application.Session.GetDefaultFolder(olFolderInbox) Set xCurrentFld = Outlook.Application.ActiveExplorer.CurrentFolder If xCurrentFld.Parent = xInboxFld Then Set xInboxFld = xCurrentFld End If