Results 1 to 4 of 4
  1. #1
    Star Lounger
    Join Date
    Apr 2002
    Location
    Stone Ridge, New York, USA
    Posts
    61
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Fit Text in Formfield/Table Cell (2000)

    I'm looking for a way to set a formfield or a table cell so that when text is entered and it doesn't fit, rather than going to the next line, it condenses. I've tried the "Fit Text" choice in the Table Cell Formatting Options, and one would think that would do the trick, but it expands the text to the size of the formfield as well as condenses it (which is really stupid). So if I type a four letter word (funny how I immediately thought "four letter word"!) into the formfield I get a ton of space between each of the four letters. Then as I type more characters in, the spacing normalizes.

    What I would like is for the spacing to remain normal until I get to the limit of the formfield and then the text should start condensing as I run out of room.

    I hope I explained that clearly enough. Any help would be much appreciated.

    Thanks.

  2. #2
    2 Star Lounger
    Join Date
    Jul 2001
    Location
    Wisconsin, USA
    Posts
    193
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Fit Text in Formfield/Table Cell (2000)

    While in the table, go to Table Properties, click the Table tab, click Options, and uncheck "Automatically resize to fit contents".

  3. #3
    Star Lounger
    Join Date
    Apr 2002
    Location
    Stone Ridge, New York, USA
    Posts
    61
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Fit Text in Formfield/Table Cell (2000)

    Thanks Leanne, but I'm talking about the font spacing expanding within the table cell/formfield - not the table cell expanding.

    Under Table Properties - Cell - Options - there's a choice for "Fit Text" which makes the font spacing adjust to fit the text into the cell. So when you enter text, it sort of shrinks it to fit into the cell - which is great - but the problem is if you type only a few characters into the cell, it spreads the characters out so they go from the right cell border to the left cell border.

    I need the condense spacing to work - but I don't want the expand spacing to happen. I'm still searching for a solution. But thanks for your time.

  4. #4
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Fit Text in Formfield/Table Cell (2000)

    How about a macro you can assign to a keystroke?
    <pre>Sub ToggleFitText()
    ' Switch the FitText setting (True/False) for the first
    ' cell in the current selection, if we're in a table
    If Selection.Information(wdWithInTable) Then
    With Selection.Cells(1)
    If .FitText <> False Then
    .FitText = False
    .Range.Font.Spacing = 0
    Else
    .FitText = True
    End If
    End With
    End If
    End Sub</pre>

    Note that the dialog seems to reset the spacing automatically, so I emulated that as well as I could in code. Probably would be better to interrogate the underlying style, but... it's dinnertime and I'm really hungry. <img src=/S/laugh.gif border=0 alt=laugh width=15 height=15>

    P.S. If anyone can tell me why If .FitText = True Then does not work, you get a gold star.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •