Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-26-2022, 02:03 AM
Guessed's Avatar
Guessed Guessed is offline replacing_within_range Windows 10 replacing_within_range Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,159
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

The code I provided looks like it sticks to the selection so I'm not sure why it is failing for you.

Is the first/last character in your selection one of the found items?
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #2  
Old 04-26-2022, 04:46 AM
Bikram Bikram is offline replacing_within_range Windows 10 replacing_within_range Office 2007
Advanced Beginner
replacing_within_range
 
Join Date: Jul 2021
Location: Nepal
Posts: 94
Bikram is on a distinguished road
Default

If the found item is the first character of the selection then wdreplaceall replaces beyond the selection if the found item is other than the first character then the code works fine and only replaces within the selection.
Reply With Quote
Reply



Other Forums: Access Forums

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