我想创建一个VBA宏来搜索所有文件夹,包括按颜色类别RED
不知道从哪里开始!
我有一个文本搜索,但这显然没有颜色。
Sub SearchMacro()
Dim myOlApp As New Outlook.Application
txtSearch = "category:(Business)"
myOlApp.ActiveExplorer.Search txtSearch, olSearchScopeAllFolders
Set myOlApp = Nothing
End Sub
答案 0 :(得分:2)
你试过了吗?
txtSearch = "category:=""Red category"""
达成:
Sub Red()
Dim myOlApp As New Outlook.Application
txtSearch = "category:=""Red category"""
myOlApp.ActiveExplorer.Search txtSearch, olSearchScopeAllFolders
Set myOlApp = Nothing
End Sub