#1   Report Post  
Posted to microsoft.public.word.tables
Antek Antek is offline
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   Report Post  
Posted to microsoft.public.word.tables
Lene Fredborg Lene Fredborg is offline
external usenet poster
 
Posts: 1,291
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   Report Post  
Posted to microsoft.public.word.tables
Antek Antek is offline
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   Report Post  
Posted to microsoft.public.word.tables
Suzanne S. Barnhill Suzanne S. Barnhill is offline
external usenet poster
 
Posts: 33,624
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   Report Post  
Posted to microsoft.public.word.tables
Lene Fredborg Lene Fredborg is offline
external usenet poster
 
Posts: 1,291
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   Report Post  
Posted to microsoft.public.word.tables
Antek Antek is offline
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   Report Post  
Posted to microsoft.public.word.tables
Antek Antek is offline
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






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
Table shadings print in colour when its set to grey on screen Jamie Tables 2 July 6th 06 03:39 AM


All times are GMT +1. The time now is 10:08 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"