Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-11-2013, 04:50 PM
gmaxey gmaxey is offline Loop action in Word until not found Windows 7 32bit Loop action in Word until not found Office 2010 (Version 14.0)
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,652
gmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nice
Default

Code:
Sub ScratchMacro()
'A basic Word macro coded by Greg Maxey
Dim oRng As Word.Range
 Set oRng = ActiveDocument.Range
 With oRng.Find
   .ClearFormatting
   .Text = "\?*^13"
   .Replacement.Text = ""
   .Forward = True
   .Wrap = wdFindContinue
   .Format = False
   .MatchCase = False
   .MatchWholeWord = False
   .MatchWildcards = True
   .MatchSoundsLike = False
   .MatchAllWordForms = False
   While .Execute
     oRng.MoveEnd wdCharacter, -1
     oRng.Delete
    Wend
 End With
End Sub

__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote
  #2  
Old 07-12-2013, 01:26 AM
kilburfi kilburfi is offline Loop action in Word until not found Windows 7 64bit Loop action in Word until not found Office 2007
Novice
Loop action in Word until not found
 
Join Date: Jul 2013
Posts: 2
kilburfi is on a distinguished road
Default Worked a treat

Greg - thanks this code works a treat. I have to admit I was nearly there whilst waiting for a response but it took me a while (very VBA rusty)!
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Loop action in Word until not found Macro to create new word doc and save the file using String found in the document VBNation Word VBA 2 02-08-2013 07:14 AM
Loop action in Word until not found Get para no where txt is found, and move text to end of paragraph using Word 201 marceepoo Word VBA 2 12-20-2012 11:42 AM
Loop action in Word until not found Macro to loop in Word Yamaha Rider Word VBA 2 02-07-2012 05:33 PM
How to link an action on one slide on a powerpoint with the same action on another slevinmj PowerPoint 0 02-24-2011 05:38 AM
templates 2003 can't be found in 2007 word tintincute Word 1 12-23-2009 08:55 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:54 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2026 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft