Skip to content

Latest commit

 

History

History
72 lines (36 loc) · 1.73 KB

Outlook.TableView.Filter.md

File metadata and controls

72 lines (36 loc) · 1.73 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
TableView.Filter property (Outlook)
vbaol11.chm2516
vbaol11.chm2516
Outlook.TableView.Filter
7e65e578-5f0c-d875-608c-cefe9bc1b55b
06/08/2017
medium

TableView.Filter property (Outlook)

Returns or sets a String value that represents the filter for a view. Read/write.

Syntax

expression. Filter

expression A variable that represents a TableView object.

Remarks

The value of this property is a string, in DAV Searching and Locating (DASL) syntax, that represents the current filter for the view. For more information about using DASL syntax to filter items in a view, see Filtering Items.

Example

The following Visual Basic for Applications (VBA) example obtains a View object by using the CurrentView property of the Explorer object, then sets the Filter property of the View object to display only those Outlook items that were received last week.

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

See also

TableView Object

[!includeSupport and feedback]