Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.tables
CA_stateworker CA_stateworker is offline
external usenet poster
 
Posts: 1
Default How do I change a table cell color globally?

I have a table with color coded cells. I would like to change all the green
cells to a different color. Is there anyway I can change all the green cells
globally or do I have to select and change the color of each cell
individually?

Thank you
--
stateworker
  #2   Report Post  
Posted to microsoft.public.word.tables
Doug Robbins - Word MVP on news.microsoft.com Doug Robbins - Word MVP on news.microsoft.com is offline
external usenet poster
 
Posts: 407
Default How do I change a table cell color globally?

Run a macro containing the following code when the cursor is in the table

Dim i As Long
Dim j As Long
With Selection.Tables(1)
For i = 1 To .Rows.Count
For j = 1 To .Columns.Count
With .Cell(i, j).Shading
If .BackgroundPatternColorIndex = wdGreen Then
.BackgroundPatternColorIndex = wdRed
End If
End With
Next j
Next i
End With

See the article "What do I do with macros sent to me by other newsgroup
readers to help me out?" at:

http://www.word.mvps.org/FAQs/Macros...eateAMacro.htm


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com

"CA_stateworker" wrote in message
...
I have a table with color coded cells. I would like to change all the
green
cells to a different color. Is there anyway I can change all the green
cells
globally or do I have to select and change the color of each cell
individually?

Thank you
--
stateworker



  #3   Report Post  
Posted to microsoft.public.word.tables
Richard Morey Richard Morey is offline
external usenet poster
 
Posts: 1
Default How do I change a table cell color globally?

Hi --

I would like to do something similar with 30 tables in a document, but I
want to change the table width so that column 1 is 1.25" and column 2 is
4.75".

Can you offer me a simple way to accomplish this?

Thanks

Rich

"Doug Robbins - Word MVP on news.microsoft.com"
wrote in message ...
Run a macro containing the following code when the cursor is in the table

Dim i As Long
Dim j As Long
With Selection.Tables(1)
For i = 1 To .Rows.Count
For j = 1 To .Columns.Count
With .Cell(i, j).Shading
If .BackgroundPatternColorIndex = wdGreen Then
.BackgroundPatternColorIndex = wdRed
End If
End With
Next j
Next i
End With

See the article "What do I do with macros sent to me by other newsgroup
readers to help me out?" at:

http://www.word.mvps.org/FAQs/Macros...eateAMacro.htm


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com

"CA_stateworker" wrote in
message ...
I have a table with color coded cells. I would like to change all the
green
cells to a different color. Is there anyway I can change all the green
cells
globally or do I have to select and change the color of each cell
individually?

Thank you
--
stateworker





  #4   Report Post  
Posted to microsoft.public.word.tables
Doug Robbins - Word MVP on news.microsoft.com Doug Robbins - Word MVP on news.microsoft.com is offline
external usenet poster
 
Posts: 407
Default How do I change a table cell color globally?

Dim i As Long
With ActiveDocument
For i = 1 To .Tables.Count
With .Tables(i)
.Columns(1).Width = InchesToPoints(1.25)
.Columns(2).Width = InchesToPoints(4.75)
End With
Next i
End With


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com

"Richard Morey" wrote in message
...
Hi --

I would like to do something similar with 30 tables in a document, but I
want to change the table width so that column 1 is 1.25" and column 2 is
4.75".

Can you offer me a simple way to accomplish this?

Thanks

Rich

"Doug Robbins - Word MVP on news.microsoft.com"
wrote in message ...
Run a macro containing the following code when the cursor is in the table

Dim i As Long
Dim j As Long
With Selection.Tables(1)
For i = 1 To .Rows.Count
For j = 1 To .Columns.Count
With .Cell(i, j).Shading
If .BackgroundPatternColorIndex = wdGreen Then
.BackgroundPatternColorIndex = wdRed
End If
End With
Next j
Next i
End With

See the article "What do I do with macros sent to me by other newsgroup
readers to help me out?" at:

http://www.word.mvps.org/FAQs/Macros...eateAMacro.htm


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com

"CA_stateworker" wrote in
message ...
I have a table with color coded cells. I would like to change all the
green
cells to a different color. Is there anyway I can change all the green
cells
globally or do I have to select and change the color of each cell
individually?

Thank you
--
stateworker







Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Word 2007 table cell color selection Dick De Vries Tables 7 May 16th 07 04:22 PM
change color of cell based upon form drop down selection Tim Doyle Tables 1 October 27th 06 07:41 PM
Can I easily globally change the color of all hyperlinks? wescalifornia Microsoft Word Help 2 December 17th 04 01:52 AM
Need to add fill color to a table cell Jen G Tables 2 November 30th 04 06:31 PM
Change cell height in one cell only in a table kat Tables 1 November 15th 04 01:26 AM


All times are GMT +1. The time now is 08:36 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"