Resizing text

C

Chris Jenkins

Is there a way in which if i set a text box (or table?) that I can get the
text to automatically reduce in size in order to fit the box rather than
have to do this manually??

Thanks & regards,

Chris J
 
D

Doug Robbins - Word MVP

Hi Chris,

There is no automatic way, but if you select the text and run a macro
containing the following code, it will reduce the font size by half a point
each time it is run:

Dim fontsize As Integer
fontsize = Selection.Font.Size
Selection.Font.Size = fontsize - .5

You could assign it to the keyboard to facilitate its use.

If you did not want to have to first select all of the text in the textbox
or table, you could use the appropriate one of the following:

For a textbox:

Dim fontsize As Integer
fontsize = Selection.ShapeRange.TextFrame.TextRange.Font.Size
Selection.ShapeRange.TextFrame.TextRange.Font.Size = fontsize - 0.5
End Sub

For a table:

Dim fontsize As Integer
fontsize = Selection.Tables(1).Range.Font.Size
Selection.Tables(1).Range.Font.Size = fontsize - 0.5

Please respond to the newsgroups for the benefit of others who may be
interested.

Hope this helps
Doug Robbins - Word MVP
 

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