![]() |
#2
|
|||
|
|||
![]()
This is a very easy method to find highlighted text in your word document
Code:
Sub Runme() 'Note that this code is written into a word VBE. You could just as easy write something similar into excel. Dim w As Variant For Each sentence In ActiveDocument.StoryRanges For Each w In sentence.Words 'Returns a bolded word If w.Font.Bold = True Then Debug.Print "Bold: " & w 'Returns a highlighted word If w.HighlightColorIndex > 0 Then Debug.Print "Hightlight: " & w Next Next End Sub https://www.msofficeforums.com/word-...text-word.html Give it a go and see where you end up. |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Highlight word document with words from .txt file | Big_Sugah | Word VBA | 11 | 01-24-2023 02:15 PM |
![]() |
hcl75 | Word VBA | 3 | 10-08-2022 02:39 PM |
Copy words from word to excel | TA9523 | Word VBA | 13 | 01-30-2021 06:50 AM |
Macro to highlight repeated words in word file and extract into excel file | aabri | Word VBA | 1 | 06-14-2015 07:20 AM |
![]() |
fuchsd | Word | 6 | 10-25-2011 05:52 AM |