![]() |
#1
|
|||
|
|||
![]() I did a search before posing this but did not find a solution for my particular request. I have the following code which is working beautifully however I want not only the found words to be highlighted but all the text in that row, which may include spaces and text. For example, after I find Procedure Step: I want it to highlight all the information following it. Procedure Step: Inbound Staging Procedure Step: FIFO Here is the code I have so far: Code:
Sub Highlight_Word() Dim sFindText As String 'Start from the top of the document Selection.HomeKey wdStory sFindText = "Procedure Step:" Selection.Find.Execute sFindText Do Until Selection.Find.Found = False Selection.Range.HighlightColorIndex = wdYellow Selection.MoveRight Selection.Find.Execute Loop End Sub Mark Last edited by macropod; 10-29-2012 at 02:40 PM. Reason: Added code tags & formatting |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to find out the duplicates and highlight them? | Learner7 | Excel | 6 | 06-08-2017 06:04 AM |
![]() |
RBLampert | Word VBA | 13 | 10-23-2012 04:45 PM |
Keyboard shortcut for 'not highlight' in 'Find'? | bertietheblue | Word | 0 | 05-02-2012 06:16 AM |
Highlight text and find next instance | DrDOS | Word | 0 | 11-15-2010 04:02 PM |
find - reading highlight - highlight all / highlight doesn't stick when saved | bobk544 | Word | 3 | 04-15-2009 03:31 PM |