![]() |
|
#2
|
||||
|
||||
|
They're just ordinary spaces. You can't clean them up by the normal centring/uncentring methods in VBA but you can clean them up with code like:
Code:
Sub Demo()
Application.ScreenUpdating = False
Dim Tbl As Table, Cll As Cell
For Each Tbl In ActiveDocument.Tables
For Each Cll In Tbl.Range.Cells
With Cll.Range
If Len(.Text) > 2 Then
Do While .Characters.First.Text = " "
.Characters.First.Text = vbNullString
Loop
End If
If Len(.Text) > 2 Then
Do While .Characters.Last.Previous.Text = " "
.Characters.Last.Previous.Text = vbNullString
Loop
End If
End With
Next
Next
Application.ScreenUpdating = True
End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Table of contents - unwanted spaces | MichyX | Word | 7 | 11-02-2017 02:12 PM |
How to remove blank spaces between rows in a table,
|
Jamal NUMAN | Word | 2 | 04-28-2017 12:59 PM |
| How to remove spaces from Cells which are at the end of value? | LearnerExcel | Excel | 2 | 12-19-2016 01:10 PM |
| How can I delete spaces & lines in a table cell | mrayncrental | Word VBA | 3 | 10-20-2014 07:09 PM |
Columns lines in table have spaces and indents in the borders
|
lukester | Word Tables | 3 | 07-11-2012 07:01 AM |