Skip to content

Latest commit

 

History

History
67 lines (38 loc) · 1.23 KB

PowerPoint.TextFrame.AutoSize.md

File metadata and controls

67 lines (38 loc) · 1.23 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
TextFrame.AutoSize property (PowerPoint)
vbapp10.chm558012
vbapp10.chm558012
PowerPoint.TextFrame.AutoSize
771f5217-abce-f70d-743d-e17532dabd9e
06/08/2017
medium

TextFrame.AutoSize property (PowerPoint)

Returns or sets a value that indicates whether the size of the specified shape is changed automatically to fit text within its boundaries. Read/write.

Syntax

expression.AutoSize

expression A variable that represents an TextFrame object.

Return value

PpAutoSize

Remarks

The value of the AutoSize property can be one of these PpAutoSize constants.

ppAutoSizeMixed
ppAutoSizeNone
ppAutoSizeShapeToFitText

Example

This example adjusts the size of the title bounding box on slide one to fit the title text.

Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes(1)

    If .TextFrame.TextRange.Characters.Count < 50 Then

        .TextFrame.AutoSize = ppAutoSizeShapeToFitText

    End If

End With

See also

TextFrame Object

[!includeSupport and feedback]