![]() |
#2
|
||||
|
||||
![]()
The following will probably do the trick.
Code:
Sub ShrinkCellTextToFit() Dim orng As Range Dim i As Long Const iCol As Integer = 2 'the column to process If Not Selection.Information(wdWithInTable) Then MsgBox "Put the cursor in the table and try again" GoTo lbl_Exit End If For i = 1 To Selection.Tables(1).Rows.Count Set orng = Selection.Tables(1).Cell(i, iCol).Range orng.End = orng.End - 1 Do Until orng.ComputeStatistics(wdStatisticLines) = 1 orng.Font.Shrink Loop Next i lbl_Exit: Exit Sub End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
lyle | Word | 1 | 02-11-2014 03:57 AM |
Asian typography in text boxes - how to avoid lines starting with periods | markpete | Word | 0 | 11-17-2012 01:45 PM |
![]() |
Mayla | Word | 2 | 06-04-2012 07:37 AM |
Break Pivot Into Multiple Tables | Pramalot | Excel | 0 | 05-22-2012 05:21 AM |
![]() |
b0x4it | Word | 4 | 06-14-2011 10:01 PM |