本文介绍了Outlook VBA 宏按颜色类别搜索的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想制作一个 VBA 宏来按颜色类别搜索所有文件夹,包括我的在线存档 RED

I want to make a VBA macro to search ALL folders including my online archive by colour category RED

不知道从哪里开始!

我有一个文本搜索,但这显然没有颜色.

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

推荐答案

您是否尝试过:

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

这篇关于Outlook VBA 宏按颜色类别搜索的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-18 11:21