Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-18-2013, 01:50 PM
fumei fumei is offline Highlight only the characters ER when it occurs in SEVERE. Windows 7 64bit Highlight only the characters ER when it occurs in SEVERE. Office XP
Expert
 
Join Date: Jan 2013
Posts: 440
fumei is on a distinguished road
Default

or....



Code:
Sub Sev_ER()
Dim r As Range
Set r = ActiveDocument.Range
With r.Find
   Do While .Execute(findtext:="severe", Forward:=True) = True
      With r
         .MoveStart 1, 3
         .MoveEnd 1, -1
         .HighlightColorIndex = wdGreen
         .Collapse 0
      End With
   Loop
End With
End Sub
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Highlight only the characters ER when it occurs in SEVERE. count how many tims a certain value occurs lucnijs Excel 6 03-26-2012 09:29 AM
Highlight only the characters ER when it occurs in SEVERE. Highlight the first X number of characters 14spar15 Word 1 11-13-2011 11:17 PM
Highlight Document Jodib PowerPoint 1 10-14-2011 07:25 AM
Junk characters (box-like characters) in Word file Sashikala Word 1 04-20-2010 02:03 PM
find - reading highlight - highlight all / highlight doesn't stick when saved bobk544 Word 3 04-15-2009 03:31 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:18 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