PictureFormat.HorizontalScale 属性 (Publisher)
返回一个 Long ,该值代表图片沿水平轴的缩放比例。 缩放百分比 (例如,等于 200 200%缩放) 表示。 此为只读属性。
语法
表达式。HorizontalScale
表达 一个代表 PictureFormat 对象的变量。
返回值
Long
备注
图片的有效分辨率与打印图片所采用的缩放比例成反比例。 缩放比例越大,有效分辨率越低。 例如,假定一幅高 4 英寸宽 4 英寸的图片原来的扫描分辨率为 300 dpi。 如果将其缩放至高 2 英寸宽 2 英寸,则该图片的有效分辨率为 600 dpi。
使用 EffectiveResolution 属性可以确定图片或 OLE 对象在指定文档中打印的分辨率。
示例
以下示例打印当前出版物中每张图片的所选图像属性。
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
Debug.Print "File Name: " & .Filename
Debug.Print "Resolution in Publication: " & .EffectiveResolution & " dpi"
Debug.Print "Horizontal Scaling: " & .HorizontalScale & "%"
Debug.Print "Height in publication: " & .Height & " points"
Debug.Print "Vertical Scaling: " & .VerticalScale & "%"
Debug.Print "Width in publication: " & .Width & " points"
End If
End With
End If
Next shpLoop
Next pgLoop
支持和反馈
有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈