DisplayAsIcon Property Example

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

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

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.

Set myObj = ActiveDocument.Shapes.AddOLEObject _
    (FileName:="c:\program files\microsoft office" _
    & "\office\examples\samples.xls", LinkToFile:=True)
myObj.OLEFormat.DisplayAsIcon = True