View Single Post
  #4   Report Post  
Ernie Starr Ernie Starr is offline
Junior Member
 
Posts: 0
Default

Quote:
Originally Posted by Greg View Post
I have a contract document in Word 2007 format. I need to located all of the
capitalized terms to ensure they are listed in the Definitions section of the
contract. Is there any easy way to locate all of the capitalized words in a
Word document?
Hi Greg,

There are 2 ways to locate all capitalized terms in your document as follows:

1. Use "Advanced Find" Feature
Enter "[A-Z]{1,}" (without quotation marks) in "Find what" text box.
It shall find you all capitalized words. To be exact, it finds all words with at least one letter capitalized.
And only capitalized letters are in selection not the entire word.

2. Run a Macro
Press "Alt+ F11" to open VBA editor and create a new module.
Then paste and run the following codes:

Sub FindandHighlightCapitalizedWords()
Dim objRange As Range

With Selection
.HomeKey Unit:=wdStory

With Selection.Find
.ClearFormatting
.Text = "[A-Z]{1,}"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchWildcards = True
.Execute
End With
Do While .Find.Found
Set objRange = Selection.Range
objRange.HighlightColorIndex = wdBrightGreen
.Collapse wdCollapseEnd
.Find.Execute
Loop
End With
End Sub

The effect is the same as that in method 1.

For more detailed information, you can refer to this article:

https://www.datanumen.com/blogs/2-qu...word-document/


Hope that helps!

Ernie

Last edited by Ernie Starr : April 24th 17 at 05:05 AM