Bryce Bassett
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"
2. Change to Shrink text on overflow - text reduces to 40 but does NOT fit into shape
3. Manually shrink text to 36 - resets to "Do not autofit"
4. Change again to Shrink text on overflow - text reduces to 32 (smaller than it needs to be)
I planning to execute this in VBA once I figure this out (myshape.TextFrame2.AutoSi ze = 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.
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"
2. Change to Shrink text on overflow - text reduces to 40 but does NOT fit into shape
3. Manually shrink text to 36 - resets to "Do not autofit"
4. Change again to Shrink text on overflow - text reduces to 32 (smaller than it needs to be)
I planning to execute this in VBA once I figure this out (myshape.TextFrame2.AutoSi
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.
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.
Any other suggestions? Thanks.
BTW, why doesn't InchesToPoints work in PowerPoint 2016?
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
Any other suggestions? Thanks.
BTW, why doesn't InchesToPoints work in PowerPoint 2016?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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
ASKER
I came up with a workaround that solved the problem. Expert suggestion did not solve the issue. But i appreciate the response
pls try as a workaround
Open in new window
Regards