Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #10  
Old 12-05-2012, 03:23 AM
macropod's Avatar
macropod macropod is offline Selection of all Text for a specific page in word is spanning selection across pages Windows 7 64bit Selection of all Text for a specific page in word is spanning selection across pages Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,375
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
 



Similar Threads
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
Selection of all Text for a specific page in word is spanning selection across pages Text Box Selection 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
Selection of all Text for a specific page in word is spanning selection across pages table spanning multiple pages 'upside down' lj_eco Word Tables 13 07-17-2011 04:39 PM
Selection of all Text for a specific page in word is spanning selection across pages Form Field - Drop down selection causing auto text chesspupil Word VBA 7 05-09-2010 05:43 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:54 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft