Thread: Shadings
View Single Post
  #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