Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.tables
|
|||
|
|||
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
Posted to microsoft.public.word.tables
|
|||
|
|||
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
Posted to microsoft.public.word.tables
|
|||
|
|||
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
Posted to microsoft.public.word.tables
|
|||
|
|||
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
Posted to microsoft.public.word.tables
|
|||
|
|||
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
Posted to microsoft.public.word.tables
|
|||
|
|||
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
Posted to microsoft.public.word.tables
|
|||
|
|||
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 | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Table shadings print in colour when its set to grey on screen | Tables |