Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-26-2011, 03:34 PM
macropod's Avatar
macropod macropod is offline Find and highlight multiple words in MS Word document Windows 7 32bit Find and highlight multiple words in MS Word document Office 2007
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,365
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

Hi AtaLoss,

That's a limitation of using 'MatchAllWordForms = True' - it only accepts letters. One way to handle this would be to force the Find/Replace to use both 'MatchAllWordForms = True' and 'MatchAllWordForms = False'. For example, add:
On Error Resume Next
before:
For i = 0 To UBound(Split(StrFnd, ","))


and insert:
.MatchAllWordForms = False
.Execute Replace:=wdReplaceAll
after:
.Execute Replace:=wdReplaceAll
This will pick up the words with apostrophes, but not the apostrophe and whatever follows it - unless you put the apostrophe and whatever follows it into the array.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Tags
find, highlight, multiple keywords



Similar Threads
Thread Thread Starter Forum Replies Last Post
Find and highlight multiple words in MS Word document Lost Word Document and cant find it!!! I saved it but it ISNT there!! APAV Word 9 10-09-2017 01:17 PM
Highlight text and find next instance DrDOS Word 0 11-15-2010 04:02 PM
Lock words in a document, but allow for input within the document tlinde Word 1 02-09-2010 09:07 PM
FInd recurring words in Word 2003 NJ007 Word 4 01-25-2010 03:11 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:54 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