![]() |
#25
|
||||
|
||||
![]()
The macro in the quoted post is for deleting rows where the last column contains only a 0; not for deleting blank rows. To delete rows that are entirely empty, you would use code like:
Code:
Sub MailMergeToDoc() Application.ScreenUpdating = False Dim Tbl As Table, r As Long ActiveDocument.MailMerge.Execute With ActiveDocument For Each Tbl In .Tables With Tbl For r = .Rows.Count To 2 Step -1 With .Rows(r) If Len(.Range.Text) = 2 * .Cells.Count + 2 Then .Delete End With Next End With Next End With Application.ScreenUpdating = False End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
how to delete every blank and non-numeric rows without removing the header | enuff | Excel | 3 | 08-24-2017 05:56 AM |
Removing blank pages at the end of a document | Xanzia | Word | 3 | 06-01-2014 11:13 AM |
![]() |
Welshie82 | Mail Merge | 2 | 11-14-2011 01:41 AM |
Urgent help needed with removing blank lines... | iammom2four | Outlook | 0 | 12-15-2010 06:12 AM |
![]() |
sieler | Word | 3 | 04-12-2009 01:38 PM |