Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 08-28-2013, 11:23 AM
gmaxey gmaxey is offline Need help on how to clean up my macro Windows 7 32bit Need help on how to clean up my macro Office 2010 (Version 14.0)
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,617
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
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Any easy way to clean up bulleted list? New Daddy Word 2 08-29-2013 06:00 AM
custom icon, undo/redo for macro, permanent macro Rapier Excel 0 08-05-2013 06:30 AM
Need help on how to clean up my macro Clean an Email backup file TTN Office 22 07-14-2012 01:48 AM
Need help on how to clean up my macro Clean out "Other Calendars" robinarm Outlook 2 11-03-2011 02:46 AM
How do I assign a macro to a button when the macro is in my personal workbook? foolios Excel Programming 2 07-27-2011 02:41 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:51 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