View Single Post
 
Old 08-28-2013, 11:23 AM
gmaxey gmaxey is offline Windows 7 32bit Office 2010 (Version 14.0)
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,598
gmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nice
Default

Dim is a declaration statement. oRng is a variable. Word.Range is an object.

I used DIM to declare the variable oRng as was Word.Range object.

I then set the oRng variable object = to the ActiveDocument.Range

The I searched the range for the text "^13" (I used ^13 because "^p" is invalid in the find what when wildcards are used.) "{2,}" is a wildcard statement meaning to search for 2 or more instances.

See "Learn to love ranges" here: http://gregmaxey.com/word_tip_pages/vba_basics.html
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote