该属性返回或设置存储 OLE 对象的图标的程序文件。String 类型,可读写。
expression.IconName
expression 必需。该表达式返回一个 OleFormat 对象。
本示例将所选内容中第一个图形显示为图标,并将图标下面的文字设为该图标的文件名。
Dim olefTemp As OLEFormat
If Selection.ShapeRange.Count >= 1 Then
Set olefTemp = Selection.ShapeRange(1).OLEFormat
With olefTemp
.DisplayAsIcon = True
.IconLabel = .IconName
End With
End If