Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 02-04-2020, 10:45 PM
macropod's Avatar
macropod macropod is offline Macro to delete all words with hyphens? Windows 7 64bit Macro to delete all words with hyphens? 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

A morecomprehensive wildcard Find/Replace that accommodates non-breaking hyphens, em-dashes and en-dashes:
Find = <[! ]@[^~^+^=\-]*>
Replace = nothing

If the words are whole paragraphs, use:
Find = ^13[!^13]@[^~^+^=\-]*^13
Replace = ^p
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to delete all words with hyphens? How to delete all but specific words in Microsoft Word document Landhaus416 Word 3 09-19-2018 03:00 PM
Macro to delete all words with hyphens? Using VBA to delete text between two words warddegeest Word VBA 1 01-12-2018 04:24 AM
Macro to delete all words with hyphens? Is there a possibility to remove all the hyphens inside words...? dabbler Word 1 01-17-2015 04:37 AM
Macro to delete all words with hyphens? How to find and delete duplicate words in doc cinvest Word 1 09-29-2014 08:34 PM
Macro to delete all words with hyphens? Mask mode and hyphens cyndor Word 6 07-25-2012 06:40 AM

Other Forums: Access Forums

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