Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 12-09-2022, 04:55 AM
macropod's Avatar
macropod macropod is offline How to run a macro on only specific tables in a mail merge export Windows 10 How to run a macro on only specific tables in a mail merge export Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,384
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

For example:
Code:
Dim s As Long, i As Long
With ActiveDocument
  For s = 1 To .Sections.Count - 1
    With Sections(s).Range.Tables(2)
      For i = .Rows.Count To 2 Step -1
        If Len(.Cell(i, 3).Range.Text) = 2 And Len(.Cell(i, 9).Range.Text) = 2 Then .Rows(i).Delete
      Next i
    End With
  Next
End With
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to separate mail merge tables Tesla Mail Merge 1 05-05-2022 06:55 AM
How to run a macro on only specific tables in a mail merge export Export .csv file to Word for Mail Merge? Jshopping Mail Merge 3 09-22-2018 11:04 PM
Update & Unlink Specific Merge Field in Word Doc from Mail Merge - Excel VBA RMerckling Mail Merge 16 05-17-2018 05:19 PM
How to run a macro on only specific tables in a mail merge export how do i ad a specific pdf file to a mail merge? mseibel Mail Merge 1 08-28-2012 07:53 PM
How to run a macro on only specific tables in a mail merge export specific mail merge cmccabe Mail Merge 3 06-14-2012 04:12 PM

Other Forums: Access Forums

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