vba - 如何在搜索字段中输入字符串?
问题描述
我想在 Outlook 主窗口的搜索栏中输入一个字符串。
这就是我所说的搜索栏
作为第一步,输入字符串就足够了。
一个字符串的例子是: category:="Urgent" received:this week
我已经用 View 对象和 DASL 过滤器做了一些尝试。
解决方案
尝试这个
Sub showMailviaRef()
Dim refCode As String ' define your reference
refCode = Selection ' Referance code selection in your excel sheet
With Outlook.ActiveExplorer
.ClearSearch ' Clear previous search if any
.Search refCode, olSearchScopeAllFolders
.Display 'Shows search results
End With
End Sub
推荐阅读
- google-bigquery - 在 google bigquery 中存储二进制文件(.jpg 或 .pdf)
- ios - iOS 中的 VXI-11 协议
- c++ - 在 C++ 中使用三元运算符的问题
- android - 如何在颤动中突出显示 ListView 的顶部项目
- asp.net-web-api - 如何从 Swashbuckle for asp.net 中包含的 Swagger-UI 中删除应用程序/json
- c# - 如何在 VS2019(版本 16.8.0)中将“移动应用程序(Xamarin.Forms)”项目定位到 .net 5.0?
- javascript - 在 JavaScript 中解析数字中的字母的函数
- python - 如何排列数字在熊猫中创建新列
- c++ - StringPiece 是否与字符串右值引用冲突?
- reactjs - 将路由器与其他查询参数反应相同的路径