Text in Textbox is too long - how can I fix?

K

Kenji

I have a small textbox in the powerpoint slide.

If the user has too much text, the text just overflows and keeps going
outside of the textbox.

Is there a way to make the text only appear in the textbox instead of just
chopping the text?

Thanks for any help.

Kenji4861
 
R

Rich

When you have your cursor in the text box go up to <Format> then to <text
box> and then under the "text box" tab you will find the option to 'word wrap
text in auto shape". This should keep your text from spilling out of the box
Rich
 
K

Kenji

Thanks Rich,

This still spills text to the bottom, if user has many lines. =( Any other
ways?

Kenji
 
R

Rich

I don't know of any settings that will allow you to put just a certain amount
of text in a box. The settings will allow you to center, go to the top, go
to the bottom, ect... But as far as cutting off the amount of text allowed
in a box, I don't think that's a possibility. That's just my experience.
Rich
 
S

Sonia

Right click on the text box and select Format Text Box from the menu. Click on
the Text Box tab and check the box that says "Resize AutoShape to fit text"
 
K

Kenji

Thanks Sonia,
I tried this, but the textbox just resizes (gets bigger) so it will fit
the text. I just want it to cut off. I might try using VB Tools - Text
Box. Thanks guys!

Kenji4861
 
B

Bill Dilworth

You can use the 'other textbox', if you are able to ensure that code will
run on this presentation (i.e. not for distribution).

Enable Macros on your presentation. Do step 1 from this page:
http://billdilworth.mvps.org/install_add-in.htm

Select your slide, then click View => Toolbars => Control Toolbox
From the pop-up list, select the textbox and draw this on your slide.
Double click on the new textbox (this should open the Visual Basic Editor
window)

Add this code:

Private Sub TextBox1_Change()
With TextBox1
If Len(.Text) > 10 Then
.Text = Left(.Text, 10)
.BackColor = vbRed
Else
.BackColor = vbWhite
End If
End With
End Sub

You can play with the text box properties to make the appearance correct.

In short, this code will check the length of the text in the textbox and if
it is too long, ignore the extra stuff and turn the background red. As long
as the text is an ok length, the background will be white.

I can send you a demo if you would like.

--
Bill Dilworth
Microsoft PPT MVP Team
Users helping fellow users.
===============
Please spend a few minutes checking vestprog2@
out www.pptfaq.com This link will yahoo.
answer most of our questions, before com
you think to ask them.

Change org to com to defuse anti-spam,
ant-virus, anti-nuisance misdirection.
..
..
 
S

Sonia

In that case it sounds like you need to add code to limit the string length.
Since I don't talk VBA I'll defer to others.
 
Top