![]() |
|
![]() |
|
Thread Tools | Display Modes |
|
#1
|
||||
|
||||
![]()
What you could try is cleaning up the table contents. I note that many cells have an empty first paragraph, plus text padding at the end. The following macro cleans up both, thus reducing each table's overall size.
Code:
Sub CleanUp() Dim Tbl As Table, TblCl As Cell, Rng As Range, RngDel As Range With ActiveDocument For Each Tbl In .Tables For Each TblCl In Tbl.Range.Cells Set Rng = TblCl.Range Rng.End = Rng.End - 1 Set RngDel = Rng.Characters.Last RngDel.Collapse wdCollapseEnd Do While Asc(RngDel.Characters.First.Previous) < 33 If RngDel.Start = Rng.Start Then Exit Do RngDel.Start = RngDel.Start - 1 Loop RngDel.Text = vbNullString If Rng.Paragraphs.Count > 1 Then If Len(Rng.Paragraphs.First.Range) = 1 Then Rng.Paragraphs.First.Range = vbNullString End If Next Next End With End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
![]() |
Thread Tools | |
Display Modes | |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Printing a Selection in Word and keeping it in the same place on the page | punkrae | Word | 0 | 03-29-2012 10:49 AM |
![]() |
GugaBFigueiredo | Word | 1 | 01-16-2012 09:04 PM |
Macro to populate a text form field based on dropdown selection | koloa | Word | 0 | 10-20-2011 11:52 AM |
![]() |
lj_eco | Word Tables | 13 | 07-17-2011 04:39 PM |
![]() |
chesspupil | Word VBA | 7 | 05-09-2010 05:43 AM |