Hi again! Unfortunaltely, from the very beginning it was not clear that the document had a page filling color. After the misunderstanding has been corrected, here's the code that seems to work:
Code:
Sub Deshading()
Dim oPara As Paragraph
'If the selection includes tables, error 4605 will be returned.
'Thus, an error handler is needed:
On Error Resume Next
Application.ScreenUpdating = False
For Each oPara In ActiveDocument.range.Paragraphs
oPara.range.Select
If Not selection.Shading.BackgroundPatternColor = wdColorAutomatic Then
selection.Shading.BackgroundPatternColor = wdColorAutomatic
End If
Next oPara
Application.ScreenUpdating = True
End Sub