![]() |
#2
|
||||
|
||||
![]()
Hi Jenn,
Try something based on: Code:
Sub ColorIt() Dim i As Long, R As Long, G As Long, B As Long, Rng As Range With ActiveDocument.Tables(1) For i = 2 To .Rows.Count Set Rng = .Cell(i, 1).Range Rng.End = Rng.End - 1 R = CLng(Rng.Text) Set Rng = .Cell(i, 2).Range Rng.End = Rng.End - 1 G = CLng(Rng.Text) Set Rng = .Cell(i, 3).Range Rng.End = Rng.End - 1 B = CLng(Rng.Text) .Cell(i, 4).Shading.BackgroundPatternColor = RGB(R, G, B) .Cell(i, 5).Shading.BackgroundPatternColor = RGB(R, G, B) Next i End With End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
shaukat74 | Word VBA | 1 | 01-29-2013 09:34 PM |
Change single character in PPT to another font macro | rtwwpad | PowerPoint | 1 | 01-19-2013 05:08 PM |
![]() |
choy | Word | 3 | 08-01-2012 09:12 PM |
![]() |
nestorph | Office | 2 | 10-28-2011 03:11 PM |
![]() |
JerryB | Excel | 1 | 11-30-2008 10:23 AM |