Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
The following macro looks at the cell at row 1, column 1 and shades the
cell based on a text value. You might adapt it to your needs: Sub Test() Dim oTbl As Word.Table For Each oTbl In ActiveDocument.Tables MsgBox oTbl.Cell(1, 1).Range.Text Select Case Left(oTbl.Cell(1, 1).Range.Text, Len(oTbl.Cell(1, 1).Range.Text) - 2) Case "Apples" oTbl.Cell(1, 1).Shading.BackgroundPatternColorIndex = wdRed Case "Lemons" oTbl.Cell(1, 1).Shading.BackgroundPatternColorIndex = wdYellow Case Else 'Continue case statements up to Case "5" as appropriate End Select Next End Sub |
Reply |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
cell's background color not printed correctly | Tables | |||
Color Printing | Formatting Long Documents | |||
Color Printing | Page Layout | |||
display one font color on the monitor but print in another | Microsoft Word Help | |||
Default background color in Word | Microsoft Word Help |