AddLabel Method

Applies To

Shapes collection object.

Description

Creates a label. Returns a Shape object that represents the new label.

Syntax

expression.AddLabel(Orientation, Left, Top, Width, Height)

expression Required. An expression that returns a Shapes object.

Orientation Required Long. The text orientation within the label. Can be either of the following MsoTextOrientation constants: msoTextOrientationHorizontal or msoTextOrientationVerticalFarEast. (Don't use any MsoTextOrientation constants other than these in U.S. English versions of PowerPoint.)

Left, Top Required Single. The position (in points) of the upper-left corner of the label relative to the upper-left corner of the document.

Width, Height Required Single. The width and height of the label, in points.

See Also

AddTextbox method.

Example

This example adds a vertical label that contains the text "Test Label" to myDocument.

Set myDocument = ActivePresentation.Slides(1)
myDocument.Shapes.AddLabel(msoTextOrientationVerticalFarEast, 100, 100, _
    60, 150) .TextFrame.TextRange.Text = "Test Label"