Share via


TextRange.BoundWidth Property

Returns the width (in points) of the text bounding box for the specified text frame. Read-only.

Namespace:  Microsoft.Office.Interop.PowerPoint
Assembly:  Microsoft.Office.Interop.PowerPoint (in Microsoft.Office.Interop.PowerPoint.dll)

Syntax

'Declaration
ReadOnly Property BoundWidth As Single
    Get
'Usage
Dim instance As TextRange
Dim value As Single

value = instance.BoundWidth
float BoundWidth { get; }

Property Value

Type: System.Single
Single

Examples

This example adds a rounded rectangle to slide one in the active presentation. The rectangle has the same dimensions as the text bounding box for shape one.

With Application.ActivePresentation.Slides(1).Shapes

    Set tr = .Item(1).TextFrame.TextRange

    Set roundRect = .AddShape(msoShapeRoundedRectangle, _

        tr.BoundLeft, tr.BoundTop, tr.BoundWidth, tr.BoundHeight)

End With

With roundRect.Fill

    .ForeColor.RGB = RGB(255, 0, 128)

    .Transparency = 0.75

End With

See Also

Reference

TextRange Interface

TextRange Members

Microsoft.Office.Interop.PowerPoint Namespace