View Single Post
 
Old 04-06-2021, 02:29 AM
gmayor's Avatar
gmayor gmayor is offline Windows 10 Office 2019
Expert
 
Join Date: Aug 2014
Posts: 4,137
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

Why not simply apply the colour to all text that is not in a table? e.g.


Code:
Sub Macro1()
Dim oStory As Range
Dim oPara As Paragraph
    For Each oStory In ActiveDocument.StoryRanges
        For Each oPara In oStory.Paragraphs
            If Not oPara.Range.Information(wdWithInTable) Then
                oPara.Range.Font.Color = RGB(80, 84, 77)
            End If
        Next oPara
        If oStory.StoryType <> wdMainTextStory Then
            While Not (oStory.NextStoryRange Is Nothing)
                Set oStory = oStory.NextStoryRange
                For Each oPara In oStory.Paragraphs
                    If Not oPara.Range.Information(wdWithInTable) Then
                        oPara.Range.Font.Color = RGB(80, 84, 77)
                    End If
                Next oPara
            Wend
        End If
    Next oStory
lbl_Exit:
    Set oStory = Nothing
    Exit Sub
End Sub
__________________
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