![]() |
|
#2
|
|||
|
|||
|
Hi, try this:
Code:
Sub FindYellowText()
Dim oSel As range
Dim oResponse As Document
Set sel = ActiveDocument.range
Set oResponse = Documents.Add
With sel.Find
.ClearFormatting
.Replacement.ClearFormatting
.text = ""
.MatchWildcards = False
.Forward = True
.Wrap = wdFindStop
.Font.ColorIndex = wdYellow
.Execute
Do Until Not .found
If sel.Font.ColorIndex = wdYellow Then
sel.Cut
With oResponse
selection.range.Paste
selection.MoveStart unit:=wdParagraph
selection.TypeParagraph
End With
End If
.Execute
Loop
End With
End Sub
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Copy selected text from one document and paste to new document in same position on the page
|
gasparik | Word VBA | 1 | 05-11-2020 05:41 AM |
Why do pages 10-24 disappear when I type in more text on page 2 or paste new text into the document?
|
RET | Word | 1 | 05-02-2016 07:28 PM |
colored background to text
|
userman | Word | 2 | 09-26-2012 01:52 AM |
| not showing colored text from external emails | MasterGator | Outlook | 0 | 01-31-2012 02:20 PM |
| Making text boxes with colored bar at the top | daviddoria | PowerPoint | 0 | 08-30-2009 03:19 PM |