Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-30-2018, 02:41 PM
macropod's Avatar
macropod macropod is offline Macro to find and replace specific types of spaces Windows 7 64bit Macro to find and replace specific types of spaces Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,355
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

Quote:
Originally Posted by dita View Post
I assumed that macros may contain interactive content but can see that this is not possible.
They can contain interactive content but, for what you described, that makes such a macro fairly pointless, since it's going to have to pause at each match and wait for user input, just as it would when using Find/Replace.
Quote:
Originally Posted by dita View Post
So, if we discard the interactive element, can we simply create a macro that finds the spaces mentioned in my post?
...
Once the macro finds any of these spaces, I will substitute them with non-breaking spaces, if I consider that they are applicable.
Maybe I'm missing something here - you first asked whether a macro could supply the non-breaking spaces interactively. How is your re-worded requirement any different in that regard?
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #2  
Old 05-05-2018, 03:27 AM
Pintus Pintus is offline Macro to find and replace specific types of spaces Windows XP Macro to find and replace specific types of spaces Office 2010 64bit
Novice
 
Join Date: May 2018
Posts: 7
Pintus is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post
They can contain interactive content but, for what you described, that makes such a macro fairly pointless, since it's going to have to pause at each match and wait for user input, just as it would when using Find/Replace.

Yes, I don´t mind if the macro do a pause at each match and wait for my input. The reason why I want to do this with a macro is because searching with Wildcards only allows to find one item per Find/Replace. So, using a macro, we could find different type of spaces in one go.

Maybe I'm missing something here - you first asked whether a macro could supply the non-breaking spaces interactively. How is your re-worded requirement any different in that regard?
If the macro can do the search interactively that would be best option but I´m not sure if this possible or not.
Reply With Quote
  #3  
Old 05-05-2018, 03:56 AM
macropod's Avatar
macropod macropod is offline Macro to find and replace specific types of spaces Windows 7 64bit Macro to find and replace specific types of spaces Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,355
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

Quote:
Originally Posted by Pintus View Post
searching with Wildcards only allows to find one item per Find/Replace
Not so. For example,
Find = [0‐9=\) ^s][ ^s=]
will find any of:
• 0‐9
• =
• )
• a normal space or a non-breaking space
followed by a normal space, a non-breaking space, or a =.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #4  
Old 05-05-2018, 08:36 AM
Pintus Pintus is offline Macro to find and replace specific types of spaces Windows XP Macro to find and replace specific types of spaces Office 2010 64bit
Novice
 
Join Date: May 2018
Posts: 7
Pintus is on a distinguished road
Default

Very interesting....

So, what´s the way to add more than one search in the wildcards?

Just separating what I want to find in brackets?
Reply With Quote
  #5  
Old 05-06-2018, 12:47 AM
macropod's Avatar
macropod macropod is offline Macro to find and replace specific types of spaces Windows 7 64bit Macro to find and replace specific types of spaces Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,355
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

Quote:
Originally Posted by Pintus View Post
So, what´s the way to add more than one search in the wildcards?

Just separating what I want to find in brackets?
No, it's just a single search that finds all the possibilities you listed - it may also make what you might regard as false matches. You'd need to test it.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to find and replace specific types of spaces Find and Replace/Insert 'CR', delete leading Spaces wherever a user Clicks in a Word document DavidL Word VBA 7 04-04-2018 12:01 AM
Find and Replace Macro Need djpemberton Word VBA 2 05-04-2016 07:53 PM
Macro to find and replace specific types of spaces Find and replace mutiple spaces between lowercase words only Dave T Word VBA 2 07-16-2015 11:23 PM
Macro to find and replace specific types of spaces Find and Replace Macro amparete13 PowerPoint 3 03-11-2014 05:29 AM
Macro to find and replace specific types of spaces Macro to replace one specific heading style with another ubns Word VBA 44 09-04-2012 08:17 PM

Other Forums: Access Forums

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