View Single Post
 
Old 12-13-2020, 10:04 PM
gmayor's Avatar
gmayor gmayor is offline Windows 10 Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,142
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

The following macro will clear the shading and set the font as required when used with my add-in mentioned by Charles. I have included a test macro to call it.


Code:
Sub Test()
RemShading ActiveDocument
End Sub

Function RemShading(oDoc As Document) As Boolean
Dim oPara As Paragraph
    On Error GoTo err_Handler
    For Each oPara In oDoc.Paragraphs
        If oPara.Shading.BackgroundPatternColor = RGB(255, 255, 230) Then
            oPara.Shading.BackgroundPatternColor = wdColorAutomatic    'remove the shading
            oPara.Range.Font.Name = "Calibri"    'The font you wish to apply
            oPara.Range.Font.Size = 12    'The font size
        End If
    Next oPara
    RemShading = True
lbl_Exit:
    Exit Function
err_Handler:
    RemShading = False
    Err.Clear
    Resume lbl_Exit
End Function
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote