Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 02-10-2014, 12:38 PM
gmaxey gmaxey is offline Find instance of a word in a specific style and change its color Windows 7 32bit Find instance of a word in a specific style and change its color Office 2010 (Version 14.0)
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,636
gmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nice
Default

If it is just the main text area of the document you are concerned with then this should do:

Code:
Sub ScratchMacro()
'A basic Word macro coded by Greg Maxey
Dim oRng As Word.Range
Set oRng = ActiveDocument.Range
  With oRng.Find
    .Text = "in"
    .ClearFormatting
    .Font.Name = "Courier New"
    .Replacement.ClearFormatting
    .Replacement.Font.Color = RGB(255, 119, 0)
    .Execute Replace:=wdReplaceAll
  End With
End Sub
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Find instance of a word in a specific style and change its color Deleting A blank Line that has a specific heading style , word 2010 & 2013 SteveWcg Word 5 01-08-2014 10:37 PM
Can't change color of text in table style ABode Word 6 12-03-2013 07:45 AM
Find and replace multiple documents change style BaPW Word 0 08-14-2011 11:12 AM
How to find a specific word in Powerpoint? Ozard80 PowerPoint 0 05-11-2011 04:42 PM
Highlight text and find next instance DrDOS Word 0 11-15-2010 04:02 PM

Other Forums: Access Forums

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