Table of contents
TOC
Collapse the table of content
Expand the table of content

Shapes.AddLabel Method (PowerPoint)

office 365 dev account|Last Updated: 6/12/2017
|
1 Contributor

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

Syntax

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

expression A variable that represents a Shapes object.

Parameters

NameRequired/OptionalData TypeDescription
OrientationRequiredMsoTextOrientationThe text orientation. Some of these constants may not be available to you, depending on the language support (U.S. English, for example) that you?ve selected or installed.
LeftRequiredSingleThe position, measured in points, of the left edge of the label relative to the left edge of the slide.
TopRequiredSingleThe position, measured in points, of the top edge of the label relative to the top edge of the slide.
WidthRequiredSingleThe width of the label, measured in points.
HeightRequiredSingleThe height of the label, measured in points.

Return Value

Shape

Example

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

Set myDocument = ActivePresentation.Slides(1) 
myDocument.Shapes.AddLabel(Orientation:=msoTextOrientationVerticalFarEast, _ 
    Left:=100, Top:=100, Width:=60, Height:=150).TextFrame _ 
    .TextRange.Text = "Test Label"

See also

Concepts

Shapes Object

© 2018 Microsoft