Publisher) (PictureFormat.OriginalWidth 属性

返回表示指定链接图片或 OLE 对象宽度(以磅为单位)的变体。 此为只读属性。

语法

表达式。OriginalWidth

表达式 表示 PictureFormat 对象的变量。

返回值

Variant

备注

此属性仅应用于链接图片。 对于代表嵌入或粘贴图片的形状,返回"权限被拒绝"。

使用下列属性之一可确定一个形状是否代表链接图片:

  • Shape 对象的 Type 属性
  • PictureFormat 对象的 IsLinked 属性

示例

以下示例测试当前出版物中的每张图片,并返回链接图片的所选图像属性。

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 
 
 Debug.Print "File Name: " & .Filename 
 Debug.Print "Vertical Scaling: " & .VerticalScale & "%" 
 Debug.Print "Original Image Width: " & .OriginalWidth & " points" 
 Debug.Print "Width in publication: " & .Width & " points" 
 
 End With 
 End If 
 Next shpLoop 
Next pgLoop 

支持和反馈

有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。