Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 05-02-2012, 12:52 AM
macropod's Avatar
macropod macropod is offline Macro - replace with condition Windows 7 64bit Macro - replace with condition 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

hi ubns,

Three things:
1. When posting Word-related questions, please post in the appropriate Word forum (the Word VBA forum in this case).
2. When posting code, please use the code tags on the 'Go Advanced' tab, with properly-formatted code.
3. Don't use Reserved words like 'find' for a macro's name.

Try:
Code:
Sub DeleteCents()
Application.ScreenUpdating = True
With Selection.Find
  .ClearFormatting
  .Replacement.ClearFormatting
  .Text = ".00>"
  .Replacement.Text = ""
  .Forward = True
  .Wrap = wdFindContinue
  .Format = False
  .MatchCase = False
  .MatchWholeWord = False
  .MatchWildcards = True
  .MatchSoundsLike = False
  .MatchAllWordForms = False
  .Execute Replace:=wdReplaceAll
End With
Application.ScreenUpdating = True
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
macro or find/replace JamesVenhaus Word 2 02-27-2012 03:34 PM
Macro to replace From Address in Outlook RlcZek113524 Outlook 0 06-08-2011 02:20 PM
Macro - replace with condition Macro to Replace Fonts ballj_35 Word 3 05-10-2011 01:10 AM
Macro - replace with condition check with condition karti Word 2 03-15-2011 06:06 AM
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 10:59 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