Publisher) (PictureFormat.EffectiveResolution 屬性

會傳回 Long ,代表,每英吋 (dpi) 圖片的解析度。 唯讀。

語法

運算式。EffectiveResolution

運算式 代表 PictureFormat 物件的變數。

傳回值

Long

註解

圖片的實際解析度與圖片列印的縮放比例成反比。 縮放比例越大,實際解析度越低。 例如,假設 4 X 4 英吋大小的圖片最初掃描為 300 dpi。 如果圖片調整為 2 X 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 支援與意見反應。