#1
|
|||
|
|||
search for the highlighted text
Quote:
Thanks for you suggestion, when i trying to find the highlighted text it is not finding.? |
#2
|
|||
|
|||
serach for the highlighted text
When i am searching for the highlighted text through coding it is not finding. please suggest.
|
#3
|
||||
|
||||
Sandhya: Please don't try to hijack other peoples' threads. I've moved your post from the other thread to this one.
The first post (above) has nothing to do with finding highlighted text. It simply removes highlighting - but you don't even need a macro for that. As for finding highlighted text, you can do that via a simple Find operation, where 'Highlight' is specified as a Find parameter. If you want that for a macro, simply record the action with the macro recorder.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#4
|
|||
|
|||
remove highlight in whole document
Hi,
Can any one help me to modify the code, this will remove the highlighted text at only one place, but i would like to remove in the whole active document. Sub SearchAnyHighlight() Dim hiliRng As Range Set hiliRng = ActiveDocument.Content With hiliRng.Find .Highlight = True .Execute If hiliRng.Find.Found Then MsgBox "You can't close Active Document" Do While hiliRng.Find.Execute If hiliRng.HighlightColorIndex = wdBrightGreen Then hiliRng.HighlightColorIndex = wdNoHighlight End If Loop End If End With End Sub |
#5
|
||||
|
||||
Sandhya: I have asked you before to not keep starting new threads on the same topic. Keep it up and your account will be closed.
Furthermore, the first post in this thread (to which I've merged your latest post) already shows how to remove highlighting from an entire document.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#6
|
|||
|
|||
Hi friend,
I question is to remove only that specified highlighted color i.e. "wdBrightGreen", where as per your suggestion if give the same it if remove all the highlighted things. |
#7
|
|||
|
|||
Hi,
I am sorry for the inconvenience as per your suggestion it will undo all the highlited things, but i question is to remove only specified highlighted color in entire document. Kindly help me. |
#8
|
|||
|
|||
Quote:
Hi, My question is to remove only specified highlited color not all the highlits. Kindly help me. |
#9
|
|||
|
|||
Quote:
Please hlep me.............. |
#10
|
|||
|
|||
Quote:
As per your suggestion it wil undo entire document... but i required only specified color to be undo in entire document. Kindly help me. |
#11
|
||||
|
||||
Sandhya: You did not specify the removal of only green highlights - you said:
Quote:
And do you really suppose we need all of your last five posts to tell us basically the same thing? Try: Code:
Sub Demo() Application.ScreenUpdating = False Dim i As Long With ActiveDocument.Range With .Find .ClearFormatting .Replacement.ClearFormatting .Text = "" .Replacement.Text = "" .Forward = True .Wrap = wdFindStop .Format = True .Highlight = True .Execute End With Do While .Find.Found If .HighlightColorIndex = wdBrightGreen Then i = i + 1 .HighlightColorIndex = wdNoHighlight End If .Collapse wdCollapseEnd .Find.Execute Loop End With Application.ScreenUpdating = True MsgBox i & " highlights found & removed." End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Copy paste highlighted text to another doc | MSoffice1 | Word VBA | 17 | 04-16-2022 06:45 AM |
Undo highlighted text | rohanrohith | Word VBA | 1 | 11-27-2014 04:02 PM |
W2013: text search results not highlighted in scrollbar | perevodchiki-moskva.ru | Word | 3 | 05-01-2014 09:13 PM |
Formatting- Apply changes to highlighted text results in same change to other text | sential | Word | 6 | 01-10-2014 03:22 PM |
Remove highlighted text when inserting comments | Iammuffinman | Word | 3 | 01-27-2011 02:02 AM |