Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-09-2012, 09:15 PM
macropod's Avatar
macropod macropod is offline Macro for MS Word Windows 7 64bit Macro for MS Word Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,518
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

Try:


Code:
Sub CleanTables()
Application.ScreenUpdating = False
Dim oTbl As Table, Rng As Range, i As Long, j As Long, StrTmp As String
With ActiveDocument
  For Each oTbl In .Tables
    With oTbl
      j = .Columns.Count
      For i = .Rows.Count To 1 Step -1
        With .Rows(i)
          Set Rng = .Range
          Rng.Start = .Cells(2).Range.Start
          StrTmp = Replace(Replace(Replace(Replace(Rng.Text, Chr(7), ""), vbCr, ""), " ", ""), "0", "")
          If StrTmp = "" Then .Delete
        End With
      Next
    End With
  Next
End With
Application.ScreenUpdating = True
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro in word khalfenadeem Word 1 04-11-2011 04:35 PM
Macro for MS Word Help with Word macro please Philcraig69 Word VBA 2 01-21-2011 04:19 PM
Print Macro in MS Word steve207 Word VBA 0 09-10-2010 02:11 AM
Word 2003 macro to Word 2007 to 2010 to... maruapo Word VBA 0 06-04-2010 03:43 PM
Word macro weezypenguin Word 0 02-25-2010 01:25 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:28 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