Macro in Word 2003 (To Reset All Tables Shading)

I have some .DOC documents created in Word 2003,
There are many tables inside
There is yellow shading in the table.

I am trying to create a macro to reset shading for all tables at once.
There is some error in the CODE.

Plz modify the code.   500 Pts.

Sub TableShadingOff()

Dim oTable As Table
Dim varTexture As Variant
Dim varForegroundPatternColor As Variant
Dim varBackgroundPatternColor As Variant
' Assign Texture, B/F color to Table

varTexture = wdTextureNone
varForegroundPatternColor = wdColorAutomatic
varBackgroundPatternColor = wdColorAutomatic
' Make these defaults
With Options
.DefaultBorderLineStyle = varTexture
.DefaultBorderLineWidth = varForegroundPatternColor
.DefaultBorderColor = varBackgroundPatternColor
End With

' variables ready now-------------------------------------------

' Reset B/F color on all tables in document
For Each oTable In ActiveDocument.Tables
    With oTable
            With .Shading
                .LineStyle = varTexture
                .LineWidth = varForegroundPatternColor
                .Color = varBackgroundPatternColor
            End With
            .Borders(wdBorderLeft).LineStyle = wdLineStyleNone
            .Borders(wdBorderRight).LineStyle = wdLineStyleNone
            .Borders(wdBorderTop).LineStyle = wdLineStyleNone
            .Borders(wdBorderBottom).LineStyle = wdLineStyleNone
            .Borders(wdBorderDiagonalDown).LineStyle = wdLineStyleNone
            .Borders(wdBorderDiagonalUp).LineStyle = wdLineStyleNone
            .Borders.Shadow = False
    End With
    With Options
        .DefaultBorderLineStyle = wdLineStyleSingle
        .DefaultBorderLineWidth = wdLineWidth050pt
        .DefaultBorderColor = wdColorAutomatic
    End With
Next oTable

End Sub
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

One suggestion

You can change shading manually while recording a macro

and can use that code

sorry if u have already tried this
sunilcomputerAuthor Commented:
I have solved it myself.

Hey sunilcomputer, sorry I didnt respond to your earlier question

Since I last posted, Ive been away, now Im back, Im going through my emails

Are you still having problems with it? It seems others are
I found this article which claims to have some info that may help you with links. Not sure if it will help but have a look anyway

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.