View Single Post
 
Old 08-16-2023, 09:11 AM
vivka vivka is offline Windows 7 64bit Office 2016
Expert
 
Join Date: Jul 2023
Posts: 302
vivka is on a distinguished road
Default

Hi! Back to my previous answer.
The both will work:

Code:
 
Sub Test() 
 
   selection.WholeStory
   selection.Shading.Texture = wdTextureNone
   selection.Shading.ForegroundPatternColor = wdColorAutomatic
   selection.Shading.BackgroundPatternColor = wdColorAutomatic
   selection.Collapse 1 'this deselects the text
 End Sub
Or:


Code:
Sub Test()

     With ActiveDocument.range
        .Shading.Texture = wdTextureNone
        .Shading.ForegroundPatternColor = wdColorAutomatic
        .Shading.BackgroundPatternColor = wdColorAutomatic
     End With
End Sub
Reply With Quote