View Single Post
 
Old 02-08-2022, 02:59 AM
Cendrinne's Avatar
Cendrinne Cendrinne is offline Windows 10 Office 2019
Competent Performer
 
Join Date: Aug 2019
Location: Montreal Quebec Canada
Posts: 200
Cendrinne is on a distinguished road
Default Help, to Select all Rows with color Orange......

Hello Pros,
I don't seem to have figured out, how to Select All Rows with the color Orange **Fonts**.
If found, then Convert To Text Separator:=wdSeparateByParagraphs for 1 Table and All Tables.

I figure out how to do it for the next Row, but once splited, it won't go back to the table. It doesn't have to find the next row, just select all rows with orange color then Convert to text. It will be many rows in a row, Either, at the start of a table or at the end of a table.

I've tried to find any Character, But at times, I have a row that is empty that is color Orange. How to convert to text or Paragraph mark on those too? Unless it's not doable.

[CODES] Dim aTbl As Table

Set aTbl = ActiveDocument.Tables(1)

Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorOrange
With Selection.Find
.Text = "^?"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindStop
.Format = True
.MatchCase = True
.MatchWildcards = False
End With
Selection.Find.Execute
Selection.SelectRow
'Selection.SplitTable
Selection.Rows.ConvertToText Separator:=wdSeparateByParagraphs, _
NestedTables:=False

On Error GoTo 0
[/CODES]

My idea is to keep only the rows I want to keep in a table, but Convert the Column Titles to text.

Is that even possible?
Tried to find it on the web, then trial and error, and recored steps, I'm closer to the step I want but can't find the solution.

I thank you in advance

Cendrinne

Last edited by Cendrinne; 02-08-2022 at 07:07 PM.
Reply With Quote