![]() |
|
#1
|
||||
|
||||
![]()
You could, for example, add the following macro to your mailmerge main document, then save it in the .docm format before running the mailmerge.
Code:
Sub MailMergeToDoc() Application.ScreenUpdating = False Dim t as long, r As Long ActiveDocument.MailMerge.Execute With ActiveDocument For t = .Tables.Count to 2 Step - 2 With .Tables(t) For r = 5 To 2 Step -1 Select Case r Case 5, 4, 2 If Split(.Cell(r, 2).Range.Text, vbCr)(0) = "$0.00" Then .Rows(r).Delete Next End If End Select Next End With Next End With Application.ScreenUpdating = False End Sub For Mac macro installation & usage instructions, see: https://wordmvp.com/Mac/InstallMacro.html
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
flackend | Mail Merge | 4 | 12-01-2023 02:49 PM |
![]() |
ARoude | Mail Merge | 3 | 09-10-2018 02:32 PM |
![]() |
ThisGuyJohn | Excel Programming | 5 | 02-03-2017 03:16 PM |
![]() |
MD011 | Excel Programming | 3 | 12-10-2014 02:15 AM |
![]() |
nicnad | Mail Merge | 1 | 02-22-2012 01:53 AM |