OLEFormat.DisplayAsIcon property (Word)

True if the specified object is displayed as an icon. Read/write Boolean.

Syntax

expression. DisplayAsIcon

expression A variable that represents a 'OLEFormat' object.

Example

This example displays a message box containing the name of each floating shape that's displayed as an icon on the active document.

Dim shapeLoop As Shape 
 
For Each shapeLoop In ActiveDocument.Shapes 
 If shapeLoop.OLEFormat.DisplayAsIcon Then 
 MsgBox shapeLoop.Name & " is displayed as an icon." 
 End If 
Next shapeLoop

This example inserts a Microsoft Excel worksheet as a linked OLE object on the active document and then changes the display of the object to an icon.

Dim objNew As Object 
 
Set objNew = ActiveDocument.Shapes.AddOLEObject _ 
 (FileName:="C:\Program Files\Microsoft Office" _ 
 & "\Office\Samples\samples.xls", LinkToFile:=True) 
 
objNew.OLEFormat.DisplayAsIcon = True

See also

OLEFormat Object

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.