Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
OriginalWidth Property

PictureFormat.OriginalWidth Property

Office 2007
Returns a Variant that represents, in points, the width of the specified linked picture or OLE object. Read-only.

Syntax

expression.OriginalWidth

expression   A variable that represents an PictureFormat object.

Return Value
Variant

Remarks

This property applies only to linked pictures. Returns "Permission Denied" for shapes representing embedded or pasted pictures.

To determine whether a shape represents a linked picture, use either the Type property of the Shape object, or the IsLinked property of the PictureFormat object.

Example

The following example tests each picture in the active publication, and returns selected image properties for pictures that are linked.

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 = pbLinkedPicture Then
        
            With shpLoop.PictureFormat
                   
                        Debug.Print "File Name: " & .Filename
                        Debug.Print "Vertical Scaling: " & .VerticalScale & "%"
                        Debug.Print "Original Image Width: " & .OriginalWidth & " points"
                        Debug.Print "Width in publication: " & .Width & " points"
                      
            End With
        End If
    Next shpLoop
Next pgLoop



Community Additions

ADD
Show:
© 2015 Microsoft