Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.tables
|
|||
|
|||
copying colour from a table cell to another table cell
I have produced a specific colour in a cell, I now want to use it in another
table in the same document, how can I copy the colour? |
#2
Posted to microsoft.public.word.tables
|
|||
|
|||
copying colour from a table cell to another table cell
Hi Purplejopeg,
I couldn't find a way other than to record the source color, select the target cells afterwards, and apply the recorded color. Of course, some vba-knowledge is essential. Option Explicit Dim lngColor As Long ' global for module ' ------------------------------- Sub GetColor() lngColor = Selection.Cells(1).Shading.BackgroundPatternColor End Sub ' ------------------------------- Sub SetColor() Selection.Cells.Shading.BackgroundPatternColor = lngColor End Sub You may assign the macros to convenient shortcuts. The value of lngColor might not stay defined forever, depending on what you do between getcolor and setcolor. -- Greetings from Bavaria, Germany Helmut Weber, MVP WordVBA Vista Small Business, Office XP |
#3
Posted to microsoft.public.word.tables
|
|||
|
|||
copying colour from a table cell to another table cell
Thanks, but I don't have any vba knowledge, guess it is visual basic. I have
managed to find out the colour breakdown so all is not lost, but it is very slow. "Helmut Weber" wrote: Hi Purplejopeg, I couldn't find a way other than to record the source color, select the target cells afterwards, and apply the recorded color. Of course, some vba-knowledge is essential. Option Explicit Dim lngColor As Long ' global for module ' ------------------------------- Sub GetColor() lngColor = Selection.Cells(1).Shading.BackgroundPatternColor End Sub ' ------------------------------- Sub SetColor() Selection.Cells.Shading.BackgroundPatternColor = lngColor End Sub You may assign the macros to convenient shortcuts. The value of lngColor might not stay defined forever, depending on what you do between getcolor and setcolor. -- Greetings from Bavaria, Germany Helmut Weber, MVP WordVBA Vista Small Business, Office XP |
#4
Posted to microsoft.public.word.tables
|
|||
|
|||
copying colour from a table cell to another table cell
If you've applied the colour once, you can apply it to other cells with F4
(EditRedoOrRepeat). I thought it would be enough to open and close the BordersAndShading dialog with the cursor in the cell you want to "copy" from, to pick up the colour, but that does not seem to work in Word 2003. Regards, Klaus |
#5
Posted to microsoft.public.word.tables
|
|||
|
|||
copying colour from a table cell to another table cell
FWIW, it doesn't seem to be working in Word 2007 either. The *borders* can be
picked up by visiting the Borders and Shading dialog, and then pressing F4, though. -- Stefan Blom Microsoft Word MVP "Klaus Linke" wrote: If you've applied the colour once, you can apply it to other cells with F4 (EditRedoOrRepeat). I thought it would be enough to open and close the BordersAndShading dialog with the cursor in the cell you want to "copy" from, to pick up the colour, but that does not seem to work in Word 2003. Regards, Klaus |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Colour the entire cell in a Table (not just the text)þ | Microsoft Word Help | |||
How do I lock a cell in a table so no one can type in the cell? | Tables | |||
Cell referencing in table formulas - just ONE adjacent cell | Tables | |||
How do I move from cell to cell iin a table column in Word 2003? | Tables | |||
How do I auto copy data from cell in a word table to another cell. | New Users |