Loading
WordRibbon.Tips.Net WordTips (Ribbon Interface)

Copying Fill Color in a Table

Please Note: This article is written for users of the following Microsoft Word versions: 2007 and 2010. If you are using an earlier version (Word 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Word, click here: Copying Fill Color in a Table.

April has a table in her Word document. One row is formatted with a custom color fill to match the company's logo color. April now wants to copy that fill color to other rows. She was hoping to use the Format Painter, but that just copies the text format, not the fill color used in the table cells. April wonders if there is a way to copy the fill color from one row to another.

There are a few ways that you can approach this issue. One is to simply use the tools that are available in Word. Follow these steps:

  1. Select the row that is already filled with the desired color.
  2. Display the Design tab of the ribbon.
  3. Click the down-arrow to the right of the Shading tool, in the Table Styles group. (The tool looks like a spilling bucket of paint.) Word displays a palette of colors.
  4. Click on More Colors. Word displays the Colors dialog box. (See Figure 1.) The color of the selected row should already show in the dialog box.
  5. Figure 1. The Colors dialog box.

  6. Click OK. (Note that you made no changes in the dialog box; you just clicked OK.)
  7. Select the other rows in the table whose background color you want to change.
  8. Click on the Shading tool on the Design tab of the ribbon. Your desired color is applied to the selected rows.

After you apply the desired color, if you want to apply it elsewhere (perhaps in another table or in some cells you missed), all you need to do is select the cells and press F4. The shading is repeated on the selected cells.

If you need to do this quite a bit with a number of tables or in a number of documents, you may want to consider using a macro to do the shading. A handy little macro is the one below:

Sub ShadeTable()
    Dim backColor As Long
    Dim foreColor As Long

    If Selection.Information(wdWithInTable) Then
        With Selection.Tables(1)
            backColor = .Cell(1, 1).Shading.BackgroundPatternColor
            foreColor = .Cell(1, 1).Shading.ForegroundPatternColor
            .Shading.BackgroundPatternColor = backColor
            .Shading.ForegroundPatternColor = foreColor
        End With
    Else
        MsgBox "Put the insertion point in a table"
    End If
End Sub

The macro shades an entire table based on the shading used in the first cell of the first row of the table. All you need to do is make sure you place the insertion point somewhere within the table before running it. This macro is a variation of the macro mentioned at the following website:

http://www.wordbanter.com/showthread.php?t=84194

WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (10932) applies to Microsoft Word 2007 and 2010. You can find a version of this tip for the older menu interface of Word here: Copying Fill Color in a Table.

Related Tips:

More Power! For some people, the prospect of creating Word macros can be scary. WordTips: The Macros can help you conquer your fears and you'll discover you're much more confident and productive as you make Word do exactly what you want. This is an invaluable source for learning macros. You are introduced to the topic in bite-sized chunks, pulled from past issues of WordTips. Learn at your own pace, exactly the way you want. Check out WordTips: The Macros today!

 

Comments for this tip:

Krishna V    31 Jul 2014, 02:10
@RJ Steele, I just came across your problem and you'd probably have moved on from this or figured a way out. But I'll tell you the solution I found for this anyway.

 To figure out the colour, you can right click the cell which has the colour you want, go to Borders and Shading and then further click the Shading option. Inside you will find the colour you are looking for, click it and go to more colours, which gives you the exact combination of R, G and B. Once you have used it, you will find the relevant colour under recently used colours.

I hope that solves your problem. :)
Leonardo    23 Jul 2014, 22:05
Thank you, grood job!
Exotic Hadron    08 Jul 2014, 13:17
Thanks for the wonderful tip! Who'd guess that reapplying what is already applied would set the applied color to the button state.

Although it looks natural once you know that (at least all coloring controls change their color to the one used recently), it's not as easy to figure this.
RJ Steele    02 May 2014, 10:24
Sorry, but the selected color does NOT appear in the dialog box after the document has been closed and later re-opened. The dialog box shows black. I can find no way to identify the color that was earlier used, so to copy it, etc.
Alistair Christie    17 Jan 2012, 14:53
Thanks. I couldn't find that anywhere else. It amazes me that Microsoft haven't fixed this and many other bugs with tables in Word. It makes no sense that you can't use the Format Painter to apply the background colour from one row to another. Anyway, this is at least a workaround. Thanks again.
David Ryan    14 Nov 2011, 13:36
Happy days. This has bugged me for ages. What's even better is the same tip works in Excel 2007.

Leave your own comment:

*Name:
Email:
  Notify me about new comments ONLY FOR THIS TIP
Notify me about new comments ANYWHERE ON THIS SITE
Hide my email address
*Text:
*What is 3+4? (To prevent automated submissions and spam.)
 
          Commenting Terms
 
 

Our Company

Sharon Parq Associates, Inc.

About Tips.Net

Contact Us

 

Advertise with Us

Our Privacy Policy

Our Sites

Tips.Net

Beauty and Style

Cars

Cleaning

Cooking

DriveTips (Google Drive)

ExcelTips (Excel 97–2003)

ExcelTips (Excel 2007–2013)

Gardening

Health

Home Improvement

Money and Finances

Organizing

Pests and Bugs

Pets and Animals

WindowsTips (Microsoft Windows)

WordTips (Word 97–2003)

WordTips (Word 2007–2013)

Our Products

Premium Newsletters

Helpful E-books

Newsletter Archives

 

Excel Products

Word Products

Our Authors

Author Index

Write for Tips.Net

Copyright © 2014 Sharon Parq Associates, Inc.