Partager via


IconView.IconViewType Property (Outlook)

Returns or sets an OlIconViewType constant that determines how Outlook items are displayed in the IconView object. Read/write.

Version Information

Version Added: Outlook 2007

Syntax

expression .IconViewType

expression A variable that represents an IconView object.

Remarks

If the value of this property is set to olIconSortAndAutoArrange, the value of the IconPlacement property is automatically set to olIconSortAndAutoArrange.

Example

The following Visual Basic for Applications (VBA) example configures the current IconView object to display Outlook items as a sorted, auto-arranged set of large icons.

Sub ConfigureIconView() 
 
 Dim objIconView As IconView 
 
 
 
 ' Check if the current view is an icon view. 
 
 If Application.ActiveExplorer.CurrentView.ViewType = _ 
 
 olIconView Then 
 
 
 
 ' Obtain a IconView object reference for the 
 
 ' current icon view. 
 
 Set objIconView = _ 
 
 Application.ActiveExplorer.CurrentView 
 
 
 
 With objIconView 
 
 ' Display items in the icon view as a 
 
 ' set of large icons. 
 
 .IconViewType = olIconLarge 
 
 
 
 ' Sort and auto arrange the items 
 
 ' within the icon view. 
 
 .IconPlacement = olIconSortAndAutoArrange 
 
 
 
 ' Save the icon view. 
 
 .Save 
 
 End With 
 
 End If 
 
 
 
End Sub 
 

See Also

Concepts

IconView Object Members

IconView Object