IsEmpty Property
Returns a MsoTriState constant that represents whether the specified shape is an empty picture frame. Read-only.
MsoTriState can be one of these MsoTriState constants. |
msoCTrue Not used with this property. |
msoFalse The shape is not a empty picture frame. |
msoTriStateMixed Indicates a combination of msoTrue and msoFalse for the specified shape range. |
msoTriStateToggle Not used with this property. |
msoTrue The specified shape is an empty picture frame. |
expression.IsEmpty()
expression Required. An expression that returns a PictureFrame object.
Example
The following example tests each picture in the active publication, and if it is not an empty picture frame, prints selected image properties for the picture.
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