IconView.IconPlacement Property (Outlook)

Office 2013 and later

Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

Returns or sets an OlIconViewPlacement value that determines how icons are placed within the IconView object. Read/write.

expression .IconPlacement

expression A variable that represents an IconView object.

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

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 = _ 
 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. 
 End With 
 End If 
End Sub