Publisher) (PictureFormat.IsEmpty 屬性

會傳回代表指定圖案是否為空白圖片框的 MsoTriState 常數。 唯讀。

語法

運算式。IsEmpty

表達 代表 PictureFormat 物件的 變數。

傳回值

MsoTriState

註解

IsEmpty 屬性值可以是其中一個 MsoTriState 常數之一 Microsoft Office 類型程式庫中,如下表所示。

常數 描述
msoFalse 指定的圖形不是空白圖片框。
msoTriStateMixed 會指出 在 msoTrue 和 msoFalse 指定的圖案範圍內的組合。
msoTrue 指定的圖形是空白圖片框。

範例

下列範例會測試使用中出版物中的每張圖片,如果圖片不是空白圖片框,則列印圖片的選定圖像內容。

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 "Horizontal Scaling: " & .HorizontalScale & "%" 
 Debug.Print "Vertical Scaling: " & .VerticalScale & "%" 
 Debug.Print "File size in publication: " & .FileSize & " bytes" 
 
 End If 
 
 End With 
 End If 
 Next shpLoop 
Next pgLoop 
 

支援和意見反應

有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應。