Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #5  
Old 06-21-2023, 05:38 AM
gmayor's Avatar
gmayor gmayor is offline Highlight lines based on a Word Windows 10 Highlight lines based on a Word Office 2019
Expert
 
Join Date: Aug 2014
Posts: 4,144
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

'Lines' in Word are a vague concept.

Paul's code highlights from the word to the next paragraph mark, so if the paragraph is more than one displayed 'line' more than one 'line' will be highlighted.
If the 'lines' are terminated with a manual line break (Shift+Enter) or copied from this forum you may do better with
Code:
.Text = "Ken:[!^13^11]{1,}"
Note that the text is case sensitive.
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Highlight lines based on a Word Macro To Identify & Highlight Words In MS Word Based Upon A List In Excel File Column abhimanyu Word VBA 5 03-20-2020 01:33 PM
How to highlight lines containing specific words SixStringSW Word VBA 4 06-03-2018 03:57 PM
Highlight row based on todays date problem manxman79 Excel 6 11-17-2014 09:06 AM
Highlight lines based on a Word highlight text based on find command alysolyman Word VBA 1 03-27-2013 02:46 PM
Highlight lines based on a Word How to highlight the row based on cell value? Learner7 Excel 1 12-11-2011 02:28 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:54 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft