Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 04-06-2017, 03:13 PM
macropod's Avatar
macropod macropod is offline Infinite loops occurring in find and replace functions in word macro Windows 7 64bit Infinite loops occurring in find and replace functions in word macro Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
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

That's as simple as:
Code:
With ActiveDocument.Range.Find
  .ClearFormatting
  .Replacement.ClearFormatting
  .Text = "([0-9])%(-[0-9])"
  .Replacement.Text = "\1\2"
  .Forward = True
  .Format = False
  .Wrap = wdFindContinue
  .MatchWildCards = True
  .Execute Replace:=wdReplaceAll
End With
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Infinite loops occurring in find and replace functions in word macro Need Macro for Find and Replace, Inserting logo in Ms-Word. Aswinraj Word VBA 1 06-05-2016 04:33 PM
Find and Replace Macro Need djpemberton Word VBA 2 05-04-2016 07:53 PM
Infinite loops occurring in find and replace functions in word macro Find and Replace Macro amparete13 PowerPoint 3 03-11-2014 05:29 AM
Infinite loops occurring in find and replace functions in word macro Word VBA Macro to Find and Replace based on the Alt Text of an Image bennymc Word VBA 1 01-27-2014 04:23 PM
Find and Replace Macro - A Better Way Tribos Word VBA 0 10-08-2008 03:22 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:26 PM.


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