extract highlighted text in word

  • 1
  • Question
  • Updated 1 year ago
I have highlighted the important points in my long word documents. And I want to extract them all to an new Word document so that I can check them more easily.Is there any easy way to do that? thanks for all the help. It's word 2010.
Photo of Lercty

Lercty

  • 1 Post
  • 0 Reply Likes

Posted 1 year ago

  • 1
Photo of Aderson

Aderson

  • 1 Post
  • 0 Reply Likes
Hi,

You can simply use the “Advanced Find” feature to so that. Just click “Format” button and choose “Highlight” in “Find and Replace” dialog box, then the highlighted text will be selected. Copy and paste them.

Or you can use Word VBA, like below

Sub ExtractHighlightedTextsInSameColor()
  Dim objDoc As Document, objDocAdd As Document
  Dim objRange As Range

  Set objDoc = ActiveDocument
  Set objDocAdd = Documents.Add
  objDoc.Activate

  With Selection
    .HomeKey Unit:=wdStory
     With Selection.Find
       .Highlight = True
       Do While .Execute
         If Selection.Range.HighlightColorIndex = wdYellow Then
           Set objRange = Selection.Range
           objDocAdd.Range.InsertAfter objRange & vbCr 
           Selection.Collapse wdCollapseEnd
         End If
       Loop
     End With
  End With 
End Sub
And more details at

https://www.datanumen.com/blogs/2-handy-methods-extract-highlighted-texts-word-document/

Good luck