PictureFormat.LinkedFileStatus 属性 (Publisher)
返回一个 PbLinkedFileStatus 常量,该常量指示链接到指定图片的文件的状态。 此为只读属性。
语法
表达式。LinkedFileStatus
表达 一个代表 PictureFormat 对象的变量。
返回值
PbLinkedFileStatus
备注
此属性仅应用于链接图片文件。 对于代表嵌入或粘贴图片的形状,它返回"权限被拒绝"。
使用下列属性之一可确定一个形状是否代表链接图片:
- Shape 对象的 Type 属性
- PictureFormat 对象的 IsLinked 属性
LinkedFileStatus 属性值可以是 Microsoft Publisher 类型库中声明的 PbLinkedFileStatus 常量之一。
示例
以下示例生成在当前出版物中找不到链接文件的链接图片列表。
Dim pgLoop As Page
Dim shpLoop As Shape
For Each pgLoop In ActiveDocument.Pages
For Each shpLoop In pgLoop.Shapes
If shpLoop.Type = pbLinkedPicture Then
With shpLoop.PictureFormat
If .LinkedFileStatus = pbLinkedFileMissing Then
Debug.Print .Filename
End If
End With
End If
Next shpLoop
Next pgLoop
支持和反馈
有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈