View Full Version : Solved: Autofit to placeholder
Paul_Hossler
08-27-2008, 07:03 AM
Does anyone know the VBA to "Autofit To Placeholder"?
I have a 'Loop through all slides, loop through all shapes" VBA, but I cannot figure out to force the text to autofit so that I can clean up and standardize my PPTs
Thanks
Paul
John Wilson
08-28-2008, 06:04 AM
Are you using version 2007?
s.schwantes
08-28-2008, 08:01 AM
Paul,
See my latest post. That solution might work for you too.
Steve Schwantes
Paul_Hossler
08-28-2008, 10:05 AM
John
2003 at work, 2007 at home
I'd like to be able to do a VBA autofit in both
Thanks
Paul
PS: I must be getting old :think: - I had asked the same question back on 08-09-2007.:doh:
I guess I subconsciously hoped someone had discovered a way????:dunno
Paul_Hossler
08-28-2008, 10:07 AM
Do you mean Solved: problem specifying where to paste an object copied from Excel using the shape's name ?
That's the latest one I saw, but I don't see how it applies
Paul
John Wilson
08-28-2008, 11:08 AM
In 2007 you can do this but in earlier versions I believe that this is an application wide registry setting. I am "on the road" and don't have access to an earlier version to check but I am pretty sure.
Code for 2007 only
Sub autosize()
Dim osld As Slide
Dim oshp As Shape
'prevent crash in earlier versions
On Error Resume Next
'loop through all shapes
For Each osld In ActivePresentation.Slides
For Each oshp In osld.Shapes
If oshp.Type = msoPlaceholder Then
oshp.TextFrame2.autosize = msoAutoSizeTextToFitShape
End If
Next oshp
Next osld
End Sub
Paul_Hossler
09-14-2008, 08:17 AM
Me again - sorry I didnt' get back and say "Thanks" and that in 2007 it worked fine. Well, sort of.
The bullet text place holders did all autofit, but when I finally had a top of the page title that overflowed, neither the macro or the manual way worked.
Any ideas??
Paul
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.