View Single Post
 
Old 06-21-2023, 05:38 AM
gmayor's Avatar
gmayor gmayor is offline Windows 10 Office 2019
Expert
 
Join Date: Aug 2014
Posts: 4,137
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