DisplayAsIcon Property

Microsoft Word Visual Basic

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

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