how can I copy color fill with Text in WORD Tables?

R

RosalieP

I've created a WORD table that I want to use as a template.

And am trying to copy a cell with its background color / fill to a new cell.
But only the text copies over, not the color fill.

Am I missing something? Is it possible to copy the color fill with the text
to a new cell?
 
J

Jay Freedman

RosalieP said:
I've created a WORD table that I want to use as a template.

And am trying to copy a cell with its background color / fill to a
new cell. But only the text copies over, not the color fill.

Am I missing something? Is it possible to copy the color fill with
the text to a new cell?

There is no tool for "copying" the color of cell shading. There are two
methods: manual and macro.

For the manual method, select the cell that has the desired background. Open
the Format > Background & Shading dialog and click the Shading tab. A box in
the upper-center area of the dialog will tell you the RGB color currently
applied to the cell. Write it down. :-( Close the dialog, select the other
cell (or table), reopen the dialog, and apply the same RGB color in the More
Colors sub-dialog. Caution: pay special attention to the setting of the
"Apply to" box in the Shading dialog, because Word tends to guess wrong.

Having set the color of the second cell, you can repeatedly select another
cell and press F4 to repeat the color assignment, as long as you don't do
anything else in between.

The macro method depends on exactly what you want to do. Here's a very
simple macro that just copies the color from the top left cell of the
current table to the entire table. It can be modified extensively to let you
choose which table(s) to color, where the source cell is, and what
destination cell(s) to use. See http://www.gmayor.com/installing_macro.htm
if needed.

Sub TableBackColor()
' set the background color of
' an entire table the same as
' that of the first cell

If Not Selection.Information(wdWithInTable) Then
MsgBox "Put the cursor in a table"
Exit Sub
End If

Dim backColor As Long
Dim foreColor As Long

With Selection.Tables(1)
backColor = .Cell(1, 1).Shading.BackgroundPatternColor
foreColor = .Cell(1, 1).Shading.ForegroundPatternColor
.Shading.BackgroundPatternColor = backColor
.Shading.ForegroundPatternColor = foreColor
End With
End Sub

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
R

RosalieP

Hi Jay,

Not sure if posted my first attempt at replying.

Thanks, I'll try the F4. I also discovered last night that if I opened the
Borders & Shading Menu, I could fill the cell faster than going thru all the
manual commands.

Thanks again for your reply.
Rosalie
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top