View Single Post
 
Old 09-25-2021, 11:25 PM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,176
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

Combining two conditions can be with an AND or an OR inclusion
If test1 = blah AND test2 = "blah blah" then 'this means both must be true
If test1 = blah OR test2 = "blah blah" then 'this means one must be true

So your code could be
Code:
For Each aTbl In ActiveDocument.Tables
   With aTbl.Rows(1).Range.Font
      If .Color = 192 And .Bold = True Then
        aTbl.Rows(1).ConvertToText Separator:=wdSeparateByParagraphs, NestedTables:=False
      ElseIf .Color = 192 Then
        'do something else
      End If
    End With
Next aTbl
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote