0

I am trying to shrink the text box when ever it overflows or touches boundaries of shape it is within. So that, it fits into the shape ( shapes like rectangle, square etc ). It will be more helpful if this can be done across whole presentation in all slides. Please spread beam of hope!

Image of text overlapping the boxes

As shown in the picture below, I would like to manipulate text " climate changes " to look like "climate" in upper box.

0

2 Answers 2

1

It is a simple code:

oShp.TextFrame2.AutoSize = msoAutoSizeTextToFitShape

where Oshp is the Shape in PPT


Looping through all shapes in Slide 1

Sub ResizeText()

Dim shp As Shape

    For Each oShp In ActivePresentation.Slides(1).Shapes

    oShp.TextFrame2.AutoSize = msoAutoSizeTextToFitShape

    Next


End Sub

Link to Similar Answer

Sign up to request clarification or add additional context in comments.

Comments

0

A text box is never "within" a shape. They are separate objects that are stacked on top of each other. Please see my answer to your subsequent question for better ways to handle this type of formatting.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.