IconView.Filter 属性 (Outlook)

返回或设置一个 String 值,该值代表视图的筛选器。 读/写。

语法

expressionFilter

表达 一个代表 IconView 对象的变量。

备注

此属性的值是字符串,在 DAV 搜索和定位 (DASL) 语法中,该字符串代表当前的视图筛选器。 有关使用 DASL 语法筛选视图中的项目的详细信息,请参阅筛选项目

示例

以下Visual Basic for Applications (VBA) 示例使用 Explorer 对象的 CurrentView 属性获取 View 对象,然后将 View 对象的 Filter 属性设置为仅显示上周收到的那些 Outlook 项目。

Private Sub FilterViewToLastWeek() 
 
 Dim objView As View 
 
 
 
 ' Obtain a View object reference to the current view. 
 
 Set objView = Application.ActiveExplorer.CurrentView 
 
 
 
 ' Set a DASL filter string, using a DASL macro, to show 
 
 ' only those items that were received last week. 
 
 objView.Filter = "%lastweek(""urn:schemas:httpmail:datereceived"")%" 
 
 
 
 ' Save and apply the view. 
 
 objView.Save 
 
 objView.Apply 
 
End Sub

另请参阅

IconView 对象

支持和反馈

有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。