View Single Post
 
Old 09-24-2021, 11:47 PM
macropod's Avatar
macropod macropod is offline Windows 10 Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
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

Quote:
Originally Posted by jessenox0 View Post
I am impressed that you remain active and still respond after all these years.
I'm actually no longer active. I responded only because the forum still notifies me of replies to discussions I've previously participated in.
Quote:
Originally Posted by jessenox0 View Post
Do you provide VBA help as well? The table section i'd like color shaded is like the Second column of a table, has it's own table. I was thinking of vba but how on earth do I specific that specific area only. Any thoughts?
It's not apparent to me what you mean by: "the Second column of a table, has it's own table".

Some generic code you could adapt is:
Code:
Sub MailMergeToDoc()
Application.ScreenUpdating = False
Dim Tbl As Table, r As Long
ActiveDocument.MailMerge.Execute
For Each Tbl In ActiveDocument.Tables
  With Tbl
    For r = 1 To .Rows.Count
      With .Cell(r, 2)
        If Split(.Range.Text, vbCr)(0) = "my condition" Then
          .Shading.BackgroundPatternColor = wdColorOrange
        End If
      End With
    Next
  End With
Next
Application.ScreenUpdating = True
End Sub
Note: As coded, the above macro intercepts Word's 'Edit Individual Documents' button to complete the merge and apply the shading.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote