Quote:
Originally Posted by Italophile
Without seeing the document, it is only possible to guess.
|
Oh, alright! I've uploaded an example file with the text that I talked about, if that helps.
Quote:
Originally Posted by vivka
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
|
Thank you for the help! This does not seems to work, sadly. Furthermore, it seems to select the last paragraph and make the cursor go to the end of the document.