Publisher) (PictureFormat.EffectiveResolution 属性

返回一个 Long ,该值表示,以每英寸点数 (dpi) 的图片的有效分辨率。 此为只读属性。

语法

表达式。EffectiveResolution

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

返回值

Long

备注

图片的有效分辨率与打印图片所采用的缩放比例成反比例。 缩放比例越大,有效分辨率越低。 例如,假定一幅高 4 英寸宽 4 英寸的图片原来的扫描分辨率为 300 dpi。 如果将其缩放至高 2 英寸宽 2 英寸,则该图片的有效分辨率为 600 dpi。

使用 OriginalResolution 属性确定链接图片或 OLE 对象的分辨率。

使用 HorizontalScale 和 VerticalScale 属性可确定图片的缩放比例。

示例

以下示例返回当前出版物中有效分辨率低于指定阈值 (100 dpi) 的图片的列表。

Sub ListLowResolutionPictures() 
 Dim pgLoop As Page 
 Dim shpLoop As Shape 
 
 For Each pgLoop In ActiveDocument.Pages 
 For Each shpLoop In pgLoop.Shapes 
 
 If shpLoop.Type = pbPicture Or shpLoop.Type = pbLinkedPicture Then 
 
 With shpLoop.PictureFormat 
 If .IsEmpty = msoFalse Then 
 If .EffectiveResolution < 100 Then 
 Debug.Print .Filename 
 Debug.Print "Page " & pgLoop.PageNumber 
 Debug.Print "Resolution in publication: " & .EffectiveResolution 
 End If 
 End If 
 End With 
 
 End If 
 
 Next shpLoop 
 Next pgLoop 
 
End Sub

支持和反馈

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