WPS 加载项开发 > 文字 API 参考 > OLEFormat > 属性 > OLEFormat.IconName 属性
返回或设置存储 OLE 对象的图标的程序文件。String 类型,可读写。

语法

表达式.IconName

表达式   返回 OLEFormat 对象的表达式。

示例

本示例将所选内容中第一个图形显示为图标,并将图标下面的文字设为该图标的文件名。

示例代码
if(Selection.ShapeRange.Count >= 1){
    let olefTemp = Selection.ShapeRange.Item(1).OLEFormat
    olefTemp.DisplayAsIcon = true
    olefTemp.IconLabel = olefTemp.IconName
}


请参阅