Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #7  
Old 10-31-2012, 02:03 PM
macropod's Avatar
macropod macropod is offline Help with VBA code to find and highlight text Windows 7 64bit Help with VBA code to find and highlight text Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

The '[!^13]{1,}' is a wildcard expression (you'll see that I have '.MatchWildcards = True'). The [] tells Word to find any of the enclosed character(s). In this case, the '!' says it's a character other than what follows. The '^13' represents a paragraph break. The {1,} says there is at least one, such character, but we don't necessarily know what the upper limit is. So Word is being told to find 'Procedure Step:' followed by any number of chracters other than a paragraph break.

Wildcard expressions greatly enhance Word's Find/Replace capacity. See: http://word.mvps.org/FAQs/General/UsingWildcards.htm

FWIW, you don't even need the macro in this case - it's doing nothing more than you can do through the Find/Replace dialogue.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to find out the duplicates and highlight them? Learner7 Excel 6 06-08-2017 06:04 AM
Help with VBA code to find and highlight text Find and highlight all words ending in -ly RBLampert Word VBA 13 10-23-2012 04:45 PM
Keyboard shortcut for 'not highlight' in 'Find'? bertietheblue Word 0 05-02-2012 06:16 AM
Highlight text and find next instance DrDOS Word 0 11-15-2010 04:02 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 03:23 AM.


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