Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 09-29-2013, 09:57 PM
macropod's Avatar
macropod macropod is offline Help with macro to set font colors Windows 7 32bit Help with macro to set font colors Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
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

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
PS: Sepia is actually 112, 66, 20
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with macro to set font colors MAcro to List all the Font & its size in a word document 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
Help with macro to set font colors Unable to change font colors from theme colors choy Word 3 08-01-2012 09:12 PM
Help with macro to set font colors How can I match font colors? nestorph Office 2 10-28-2011 03:11 PM
Help with macro to set font colors Font colors JerryB Excel 1 11-30-2008 10:23 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:35 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft