IconView.IconPlacement (Outlook)

Returns or sets an OlIconViewPlacement value that determines how icons are placed within the IconView object. Possible return values are olIconAutoArrange - Icons are automatically lined up and arranged to prevent gaps or overlaps, but are not sorted, olIconDoNotArrange - Icons are not automatically sorted, lined up, or arranged, olIconLineUp - Icons are automatically lined up, but are not sorted or arranged, olIconSortAndAutoArrange - Icons are automatically sorted, lined up, and arranged to prevent gaps or overlaps.

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


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