Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 12-17-2015, 03:59 AM
paik1002 paik1002 is offline Search and reduce the range of a text selection Windows 7 64bit Search and reduce the range of a text selection Office 2010 64bit
Advanced Beginner
Search and reduce the range of a text selection
 
Join Date: Dec 2015
Posts: 63
paik1002 is on a distinguished road
Default Search and reduce the range of a text selection

For a predefined selection of text, I'd like to:

1. Change the range the selection by first searching for a specific character starting from the start of the selection, and
2. When such a character is found, the range of the selection is reduced(changed) to the position of the character(character inclusive).
3. I'd also like to do 1, 2 but this time starting from the end of the selection, and going backwards.



For example,
if the predefined selection of text is: "Jim, hello there? How are you doing?", and

I wish to find a single space within the text.

After running the macro, the result would be: " hello there? How are you " (white spaces exist on both ends of the selection)
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Search and reduce the range of a text selection Help required with Selection.Find to search a text file. Marko Word VBA 2 10-18-2014 06:32 AM
Search and reduce the range of a text selection Search in Range Only Problem NobodysPerfect Word VBA 9 10-05-2014 04:43 AM
Selection (range) in Word or Excel table NobodysPerfect Word VBA 2 09-16-2014 12:06 AM
Selection or Range Tommes93 Word VBA 1 04-10-2014 02:50 AM
Search and reduce the range of a text selection Selection of all Text for a specific page in word is spanning selection across pages ramsgarla Word VBA 9 12-05-2012 03:23 AM

Other Forums: Access Forums

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