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 the 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
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for