Link to home
Start Free TrialLog in
Avatar of Bryce Bassett
Bryce BassettFlag for United States of America

asked on

PowerPoint Text Box "Shrink text on overflow" does not fit text completely inside shape

I usually stay away from PowerPoint's "Shrink text on overflow" setting for text boxes.  But I have an application where I want to use.  

But I am finding that it does not shrink the text enough.  When I set it to "shrink text," it reduces the size of the text, but not enough to fit into the text box.

Here's what I tried, in order
1. Original text 44 - box is set to "Do not autofit"
User generated image2. Change to Shrink text on overflow - text reduces to 40 but does NOT fit into shape
User generated image3. Manually shrink text to 36 - resets to "Do not autofit"
User generated image4. Change again to Shrink text on overflow - text reduces to 32 (smaller than it needs to be)
User generated image
I planning to execute this in VBA once I figure this out (myshape.TextFrame2.AutoSize = msoAutoSizeTextToFitShape).  

Do we just have to live with the fact that Shrink Text doesn't actually make the text fit inside the shape, or is there something else I can tweak to get it to behave like I want?  Thanks.
Avatar of Rgonzo1971
Rgonzo1971

Hi,

pls try as a workaround
myShape.TextFrame2.TextRange.Font.Size = myShape.TextFrame2.TextRange.Font.Size
myshape.TextFrame2.AutoSize = msoAutoSizeTextToFitShape

Open in new window

Regards
Avatar of Bryce Bassett

ASKER

Thanks for the suggestion, by it still does not work.  Here's my full code snipped, including your suggested addition.  Note that I first resize the shape and set the font to 44 because I don't want it any bigger than that.  Does that have anything to do with this?  When I autosize, I still end up with the result shown in the second image above.

For Each myshape In currentslide.Shapes
    If InStr(myshape.Name, "Title") > 0 Then
        myshape.Width = 3.75 * 72
        myshape.TextFrame.TextRange.Font.Size = 44
        myshape.TextFrame2.TextRange.Font.Size = myshape.TextFrame2.TextRange.Font.Size
        myshape.TextFrame2.AutoSize = msoAutoSizeTextToFitShape

Open in new window


Any other suggestions?  Thanks.

BTW, why doesn't InchesToPoints work in PowerPoint 2016?
ASKER CERTIFIED SOLUTION
Avatar of Bryce Bassett
Bryce Bassett
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
FYI, this is the InchesToPoints function for PowerPoint:

Option Explicit

' InchesToPoints for PowerPoint
Public Function InchesToPoints(Inches As Single) As Single
  InchesToPoints = Inches * 72
End Function

Open in new window

I came up with a workaround that solved the problem.  Expert suggestion did not solve the issue.  But i appreciate the response