Shapes.AddEmptyPictureFrame Method (Publisher)

Returns a Shape object that represents an empty picture frame inserted at the specified coordinates.

Syntax

expression. AddEmptyPictureFrame(Left, Top, Width, Height)

expression A variable that represents a Shapes object.

Parameters

Name Required/Optional Data Type Description
Left Required Variant The position of the left edge of the shape representing the picture.
Top Required Variant The position of the top edge of the shape representing the picture.
Width Optional Variant The width of the shape representing the picture. Default is -1, meaning that the width of the shape is automatically set to 72 points if the parameter is left blank.
Height Optional Variant The height of the shape representing the picture. Default is -1, meaning that the height of the shape is automatically set to 54 points if the parameter is left blank.

Return Value

Shape

Remarks

For Left, Top, Width, and Height arguments, numeric values are evaluated in points; strings can be in any units supported by Microsoft Publisher (for example, "1.5 in").

The blank picture frame has the default ToolTip "Empty Picture Frame". This is changed to "Picture" when an image is selected for the Shape.

Example

This example places an empty picture frame in the center of the first page of the publication and rotates it by 45 degrees. The AlternativeText property is set to "Picture Placeholder 1" for the Web.

Dim shpPlaceholder As Shape 
 
Set shpPlaceholder = _ 
 ActiveDocument.Pages(1).Shapes.AddEmptyPictureFrame( _ 
 230, 320, 150, 150) 
 
With shpPlaceholder 
 .AlternativeText = "Picture Placeholder 1" 
 .Rotation = 45 
End With