Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #5  
Old 05-22-2021, 03:05 AM
macropod's Avatar
macropod macropod is offline Delete blank table rows in merged document and split document in docx and pdf based on excel rows Windows 10 Delete blank table rows in merged document and split document in docx and pdf based on excel rows Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
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

All you would need to do is change:

Sub DeleteEmptyRows()
in the link to:
Sub DeleteEmptyRows(TargetDoc As Document)
and, in the same sub, change:
ActiveDocument.Tables
to:
TargetDoc.Tables

You can delete both 'Application.ScreenUpdating' rows from the 'DeleteEmptyRows' sub, too.

Then, after the line:
Set TargetDoc = ActiveDocument
in your existing sub, insert:
Call DeleteEmptyRows(TargetDoc)
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Delete blank table rows in merged document and split document in docx and pdf based on excel rows Split table cell into multiple rows based on a delimiter WJSwanepoel Word Tables 4 02-02-2021 10:33 PM
Delete blank table rows in merged document and split document in docx and pdf based on excel rows split table rows based Dynamic values generated for row Naveen Dhanaraj Word Tables 10 03-06-2020 03:23 AM
Delete blank table rows in merged document and split document in docx and pdf based on excel rows Mail Merge - split merged documents and rename each split document based on text in header FuriousD Word VBA 1 05-12-2019 04:06 AM
Delete blank table rows in merged document and split document in docx and pdf based on excel rows Design Macro or Code to Delete Table Rows When Null/Blank/Empty Upon Doc Close/Save aaghd72 Word VBA 8 02-18-2019 11:22 AM
Delete blank table rows in merged document and split document in docx and pdf based on excel rows Delete blank rows between the two rows that contain data beginner Excel Programming 5 12-26-2014 12:29 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:57 AM.


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