Export (0) Print
Expand All

PictureFormat.IsEmpty Property

Office 2007
Returns a MsoTriState constant that represents whether the specified shape is an empty picture frame. Read-only.

Syntax

expression.IsEmpty

expression   A variable that represents an PictureFormat object.

Return Value
MsoTriState

Remarks

The IsEmpty property value can be one of the MsoTriState constants declared in the Microsoft Office type library and shown in the following table.

ConstantDescription
msoFalseThe specified shape is not an empty picture frame.
msoTriStateMixedIndicates a combination of msoTrue and msoFalse for the specified shape range.
msoTrueThe specified shape is an empty picture frame.

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.

Visual Basic for Applications
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




Community Additions

ADD
Show:
© 2015 Microsoft