Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 01-14-2022, 01:14 AM
stky stky is offline Highlight not working for me Help Windows 10 Highlight not working for me Help Office 2013
Advanced Beginner
Highlight not working for me Help
 
Join Date: Apr 2021
Posts: 30
stky is on a distinguished road
Default Highlight not working for me Help

Sub NonBreakSpace()
Application.ScreenUpdating = False



Options.DefaultHighlightColorIndex = wdTurquoise
Selection.Find.Replacement.Highlight = True

Dim StrFR As String, i As Long
StrFR = "[<(et)> <(al)>]|\1^s\2"

With ActiveDocument.Range.Find
.ClearFormatting
.Replacement.ClearFormatting
.Forward = True
.Wrap = wdFindStop
.Format = True
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
.Replacement.Highlight = wdTurquoise

For i = 0 To UBound(Split(StrFR, "|")) Step 2
.text = Split(StrFR, "|")(i)
.Replacement.text = Split(StrFR, "|")(i + 1)
.Execute Replace:=wdReplaceAll
Next
End With

Application.ScreenUpdating = True
End Sub
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
I want to highlight specific weeks in the Gantt Chart view but they should be working hours PL@plan Project 1 05-05-2021 12:23 PM
highlight bar freeriding Project 0 12-07-2018 05:25 AM
Tasks Switch to Non-Working Days on Working Calendar danelloc Project 3 10-02-2017 12:38 PM
Highlight not working for me Help Ugghhh....Highlight Text not working mrayncrental Word VBA 1 02-10-2014 10:58 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 02:51 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