A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » Tables
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Shadings



 
 
Thread Tools Display Modes
  #1  
Old April 9th, 2007, 07:18 PM posted to microsoft.public.word.tables
Antek
external usenet poster
 
Posts: 7
Default Shadings

Hi,

I have a big Word97 file containing text and a lot of tables.
Some rows of the tables had been greyed using:
Format Borders and Shading Shading tab 25%.

My question is: how to get rid of the grey shadings
for all rows in the file?

I would be very grateful for any help or advice.

Regards,
Antek




  #2  
Old April 9th, 2007, 08:18 PM posted to microsoft.public.word.tables
Lene Fredborg
external usenet poster
 
Posts: 1,294
Default Shadings

You may use the macro below. The macro will remove the shading from all
tables in the active document (I have Word 2003 installed and cannot test the
macro with Word 97).

Sub RemoveTableShading()
Dim oTable As Table
For Each oTable In ActiveDocument.Tables
With oTable.Shading
.Texture = wdTextureNone
.ForegroundPatternColor = wdColorAutomatic
.BackgroundPatternColor = wdColorAutomatic
End With
Next oTable
End Sub

For help on installing macros, see:
http://www.gmayor.com/installing_macro.htm

--
Regards
Lene Fredborg
DocTools - Denmark
www.thedoctools.com
Document automation - add-ins, macros and templates for Microsoft Word


"Antek" wrote:

Hi,

I have a big Word97 file containing text and a lot of tables.
Some rows of the tables had been greyed using:
Format Borders and Shading Shading tab 25%.

My question is: how to get rid of the grey shadings
for all rows in the file?

I would be very grateful for any help or advice.

Regards,
Antek





  #3  
Old April 9th, 2007, 08:53 PM posted to microsoft.public.word.tables
Antek
external usenet poster
 
Posts: 7
Default Shadings

Thank you very much.

I don't know if it is because of differences between Word2003 and Word97.
I don't know a lot of macros :-(.

I get information pointing to
.ForegroundPatternColor =
and saying that there is an error of compilation
and that it cannot find a method or data component
(this is my translation, I use Polish version of Office97).

Regards,
Antek

You may use the macro below. The macro will remove the shading from all
tables in the active document (I have Word 2003 installed and cannot test the
macro with Word 97).

Sub RemoveTableShading()
Dim oTable As Table
For Each oTable In ActiveDocument.Tables
With oTable.Shading
.Texture = wdTextureNone
.ForegroundPatternColor = wdColorAutomatic
.BackgroundPatternColor = wdColorAutomatic
End With
Next oTable
End Sub

For help on installing macros, see:
http://www.gmayor.com/installing_macro.htm

--
Regards
Lene Fredborg
DocTools - Denmark
www.thedoctools.com
Document automation - add-ins, macros and templates for Microsoft Word


"Antek" wrote:

Hi,

I have a big Word97 file containing text and a lot of tables.
Some rows of the tables had been greyed using:
Format Borders and Shading Shading tab 25%.

My question is: how to get rid of the grey shadings
for all rows in the file?

I would be very grateful for any help or advice.

Regards,
Antek





  #4  
Old April 9th, 2007, 09:00 PM posted to microsoft.public.word.tables
Suzanne S. Barnhill
external usenet poster
 
Posts: 31,786
Default Shadings

If you're not trying to do this programmatically (with a macro) but just
want to do it manually, just select the entire table and go to Format |
Borders and Shading. On the Shading tab, select No Fill.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

"Antek" wrote in message
...
Thank you very much.

I don't know if it is because of differences between Word2003 and Word97.
I don't know a lot of macros :-(.

I get information pointing to
.ForegroundPatternColor =
and saying that there is an error of compilation
and that it cannot find a method or data component
(this is my translation, I use Polish version of Office97).

Regards,
Antek

You may use the macro below. The macro will remove the shading from all
tables in the active document (I have Word 2003 installed and cannot

test the
macro with Word 97).

Sub RemoveTableShading()
Dim oTable As Table
For Each oTable In ActiveDocument.Tables
With oTable.Shading
.Texture = wdTextureNone
.ForegroundPatternColor = wdColorAutomatic
.BackgroundPatternColor = wdColorAutomatic
End With
Next oTable
End Sub

For help on installing macros, see:
http://www.gmayor.com/installing_macro.htm

--
Regards
Lene Fredborg
DocTools - Denmark
www.thedoctools.com
Document automation - add-ins, macros and templates for Microsoft Word


"Antek" wrote:

Hi,

I have a big Word97 file containing text and a lot of tables.
Some rows of the tables had been greyed using:
Format Borders and Shading Shading tab 25%.

My question is: how to get rid of the grey shadings
for all rows in the file?

I would be very grateful for any help or advice.

Regards,
Antek






  #5  
Old April 9th, 2007, 09:10 PM posted to microsoft.public.word.tables
Lene Fredborg
external usenet poster
 
Posts: 1,294
Default Shadings

I think that the problem is caused by different Word versions. There is a
chance that the macro will work if you make the following replacements in the
code:

Replace "ForegroundPatternColor" by "ForegroundPatternColorIndex"
and
Replace "BackgroundPatternColor" by "BackgroundPatternColorIndex"

Again, I cannot test the macro in Word 97 - hope it works.

--
Regards
Lene Fredborg
DocTools - Denmark
www.thedoctools.com
Document automation - add-ins, macros and templates for Microsoft Word


"Antek" wrote:

Thank you very much.

I don't know if it is because of differences between Word2003 and Word97.
I don't know a lot of macros :-(.

I get information pointing to
.ForegroundPatternColor =
and saying that there is an error of compilation
and that it cannot find a method or data component
(this is my translation, I use Polish version of Office97).

Regards,
Antek

You may use the macro below. The macro will remove the shading from all
tables in the active document (I have Word 2003 installed and cannot test the
macro with Word 97).

Sub RemoveTableShading()
Dim oTable As Table
For Each oTable In ActiveDocument.Tables
With oTable.Shading
.Texture = wdTextureNone
.ForegroundPatternColor = wdColorAutomatic
.BackgroundPatternColor = wdColorAutomatic
End With
Next oTable
End Sub

For help on installing macros, see:
http://www.gmayor.com/installing_macro.htm

--
Regards
Lene Fredborg
DocTools - Denmark
www.thedoctools.com
Document automation - add-ins, macros and templates for Microsoft Word


"Antek" wrote:

Hi,

I have a big Word97 file containing text and a lot of tables.
Some rows of the tables had been greyed using:
Format Borders and Shading Shading tab 25%.

My question is: how to get rid of the grey shadings
for all rows in the file?

I would be very grateful for any help or advice.

Regards,
Antek






  #6  
Old April 9th, 2007, 09:33 PM posted to microsoft.public.word.tables
Antek
external usenet poster
 
Posts: 7
Default Shadings

It works!
The problem has been solved!
Once again, thank you very, very much.

Regards,
Antek


I think that the problem is caused by different Word versions. There is a
chance that the macro will work if you make the following replacements in the
code:

Replace "ForegroundPatternColor" by "ForegroundPatternColorIndex"
and
Replace "BackgroundPatternColor" by "BackgroundPatternColorIndex"

Again, I cannot test the macro in Word 97 - hope it works.

--
Regards
Lene Fredborg
DocTools - Denmark
www.thedoctools.com
Document automation - add-ins, macros and templates for Microsoft Word


"Antek" wrote:

Thank you very much.

I don't know if it is because of differences between Word2003 and Word97.
I don't know a lot of macros :-(.

I get information pointing to
.ForegroundPatternColor =
and saying that there is an error of compilation
and that it cannot find a method or data component
(this is my translation, I use Polish version of Office97).

Regards,
Antek

You may use the macro below. The macro will remove the shading from all
tables in the active document (I have Word 2003 installed and cannot test the
macro with Word 97).

Sub RemoveTableShading()
Dim oTable As Table
For Each oTable In ActiveDocument.Tables
With oTable.Shading
.Texture = wdTextureNone
.ForegroundPatternColor = wdColorAutomatic
.BackgroundPatternColor = wdColorAutomatic
End With
Next oTable
End Sub

For help on installing macros, see:
http://www.gmayor.com/installing_macro.htm

--
Regards
Lene Fredborg
DocTools - Denmark
www.thedoctools.com
Document automation - add-ins, macros and templates for Microsoft Word


"Antek" wrote:

Hi,

I have a big Word97 file containing text and a lot of tables.
Some rows of the tables had been greyed using:
Format Borders and Shading Shading tab 25%.

My question is: how to get rid of the grey shadings
for all rows in the file?

I would be very grateful for any help or advice.

Regards,
Antek






  #7  
Old April 9th, 2007, 09:37 PM posted to microsoft.public.word.tables
Antek
external usenet poster
 
Posts: 7
Default Shadings

Thanks for your answer.
I know the method you've mentioned but I have too many
tables in the file to do it manually.
However Lene Fredborg sent me a macro which solved
the problem.

Regards,
Antek


If you're not trying to do this programmatically (with a macro) but just
want to do it manually, just select the entire table and go to Format |
Borders and Shading. On the Shading tab, select No Fill.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

"Antek" wrote in message
...
Thank you very much.

I don't know if it is because of differences between Word2003 and Word97.
I don't know a lot of macros :-(.

I get information pointing to
.ForegroundPatternColor =
and saying that there is an error of compilation
and that it cannot find a method or data component
(this is my translation, I use Polish version of Office97).

Regards,
Antek

You may use the macro below. The macro will remove the shading from all
tables in the active document (I have Word 2003 installed and cannot

test the
macro with Word 97).

Sub RemoveTableShading()
Dim oTable As Table
For Each oTable In ActiveDocument.Tables
With oTable.Shading
.Texture = wdTextureNone
.ForegroundPatternColor = wdColorAutomatic
.BackgroundPatternColor = wdColorAutomatic
End With
Next oTable
End Sub

For help on installing macros, see:
http://www.gmayor.com/installing_macro.htm

--
Regards
Lene Fredborg
DocTools - Denmark
www.thedoctools.com
Document automation - add-ins, macros and templates for Microsoft Word


"Antek" wrote:

Hi,

I have a big Word97 file containing text and a lot of tables.
Some rows of the tables had been greyed using:
Format Borders and Shading Shading tab 25%.

My question is: how to get rid of the grey shadings
for all rows in the file?

I would be very grateful for any help or advice.

Regards,
Antek






 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:40 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.