![]() |
|
#1
|
||||
|
||||
![]()
The technique discussed in this thread is for changing the colour of the cell itself, via highlighting. For that, you're limited to Word's highlight options, which don't include orange.
Another possibility is to colour the text itself - for which your options are virtually unlimited. See the relevant discussions in the Mailmerge Tips & Tricks thread: https://www.msofficeforums.com/mail-...ps-tricks.html
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#2
|
|||
|
|||
![]() Quote:
|
#3
|
||||
|
||||
![]() Quote:
Quote:
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
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
VBA to immediately change the colour of a cell depending on the code placed in anothe | Phil Payne | Excel Programming | 2 | 07-27-2013 11:04 PM |
Mail Merge Code (Default Display) | ochiha_ita | Mail Merge | 3 | 04-22-2013 04:04 AM |
![]() |
Kizzy | Mail Merge | 1 | 08-13-2012 10:50 AM |
Mail merge Field Code Manipulation | macjnr | Mail Merge | 0 | 09-10-2009 11:37 AM |
![]() |
leroytrolley | Excel | 2 | 12-05-2008 02:05 AM |