title text auto resize issue

S

Steve

I have to pose this question again:

When I enter text into a new "title and content" slide, (ppt 2007) with
"autofit on", I can enter many, many lines into the body of the slide and
ppt will resize as needed, from, say 32 points all the way down to 8 points
or so if I really overload the slide. HOWEVER, as I type into the title,
ppt will only resize a little, from say 44 points to 40 points. This is
regardless of how long the title is. Of course this results in the title
text spilling all over the place If I add more than three lines or so.

Why is this? Is there something to do about it? I am often tasked with
cleaning up slides with too-long titles, and I would rather not change font
sizes manually in this instance if possible.

I have no say about the content of the titles; I just need to make them
work.

Steve
 
J

John Wilson

First - Three or more line titles are a bad idea!

Powerpoint knows this and is trying to tell your users something! If you
HAVE to do it you will need to resort to a vba macro.

As a start see if this helps - use on a copy

Sub bad_idea()
Dim osld As Slide
Dim oshp As Shape
Dim otxt As TextRange
For Each osld In ActivePresentation.Slides
For Each oshp In osld.Shapes
If oshp.Type = msoPlaceholder Then
If oshp.PlaceholderFormat.Type = ppPlaceholderTitle Or
ppPlaceholderCenterTitle Then
Set otxt = oshp.TextFrame.TextRange
Do While otxt.BoundTop < oshp.Top
otxt.Font.Size = otxt.Font.Size - 2
Loop
End If
End If
Next oshp
Next osld
End Sub

How to use vba
http://www.pptalchemy.co.uk/powerpoint_hints_and_tips_tutorials.html#vba
 
J

John Wilson

Just fixed line breaks!

Sub bad_idea()
Dim osld As Slide
Dim oshp As Shape
Dim otxt As TextRange
For Each osld In ActivePresentation.Slides
For Each oshp In osld.Shapes
If oshp.Type = msoPlaceholder Then
If oshp.PlaceholderFormat.Type = ppPlaceholderTitle Or _
ppPlaceholderCenterTitle Then
Set otxt = oshp.TextFrame.TextRange
Do While otxt.BoundTop < oshp.Top
otxt.Font.Size = otxt.Font.Size - 2
Loop
End If
End If
Next oshp
Next osld
End Sub
--
john ATSIGN PPTAlchemy.co.uk
Custom vba coding and PPT Makeovers
Free PPT Hints, Tips and Tutorials
http://www.pptalchemy.co.uk/powerpoint_hints_and_tips_tutorials.html
 
S

Steve

Uh oh. You have clearly spent some time solving my problem and I have
barely have a clue how to make use of the code! Unfortunately I am "VBA
naive". In ppt2007, I did VIEW -> MACROS -> CREATE, named the macro
"bad_idea", pasted in your code below, saved the file as a .pptm. Then, on
a new slide, my test big title still spilled over. What step have I missed?
Or am I going about this incorrectly?

BTW I agree that sometimes my client's titles are too long, but mine is not
to wonder why.

Steve
 
J

John Wilson

Ok

From my code copy all but the first and last line ie from

Dim osld as Slide
TO
Next osld

Do as you did before Create Macro > Bad_Idea

You should see two lines of code pre placed > paste the code you copied
between these lines

Press f5 to run it

Work?
--


john ATSIGN PPTAlchemy.co.uk
Custom vba coding and PPT Makeovers
Free PPT Hints, Tips and Tutorials
http://www.pptalchemy.co.uk/powerpoint_hints_and_tips_tutorials.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top