问题
I want to make a VBA macro to search ALL folders including my online archive by colour category RED
Don't have a clue where to start with this!
I have a text search one but this obviously doesn't do colours.
Sub SearchMacro()
Dim myOlApp As New Outlook.Application
txtSearch = "category:(Business)"
myOlApp.ActiveExplorer.Search txtSearch, olSearchScopeAllFolders
Set myOlApp = Nothing
End Sub
回答1:
did you tried:
txtSearch = "category:=""Red category"""
Complete:
Sub Red()
Dim myOlApp As New Outlook.Application
txtSearch = "category:=""Red category"""
myOlApp.ActiveExplorer.Search txtSearch, olSearchScopeAllFolders
Set myOlApp = Nothing
End Sub
来源:https://stackoverflow.com/questions/47791242/outlook-vba-macro-to-search-by-colour-category