OLEFormat.IconIndex property (Word)
Returns or sets the icon that is used when the DisplayAsIcon property is True. Read/write Long.
Syntax
expression. IconIndex
expression An expression that returns an 'OLEFormat' object.
Remarks
Zero (0) corresponds to the first icon, 1 corresponds to the second icon, and so on. If this argument is omitted, the first (default) icon is used.
Example
This example returns the icon index number in a message box for the first selected shape that's displayed as an icon.
Dim olefTemp As OLEFormat
If Selection.ShapeRange.Count >= 1 Then
Set olefTemp = Selection.ShapeRange(1).OLEFormat
With olefTemp
If .DisplayAsIcon = True Then Msgbox .IconIndex
End With
End If
See also
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for