IconView.IconPlacement Property (Outlook)
Returns or sets an OlIconViewPlacement value that determines how icons are placed within the IconView object. Read/write.
Version Information
Version Added: Outlook 2007
Syntax
expression .IconPlacement
expression A variable that represents an IconView object.
Remarks
If the value of the IconViewType property is set to olIconViewList, the value of this 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