G
Ganeth
Here's a poser...
THE SITUATION: I have a userform that allows for searching and replacing of text in all open documents. Works just fine. You enter the text to be searched for in one text field, the replace text in another, click OK and off it goes. The code hides the form, cycles through all open word documents, performs the operation on each one, returns to the document which was active when the userform was invoked, queries if the user would like to generate a log file of the changes, and then sets the form to visible again for the user to enter more text to be changed, if he or she so wishes
THE PROBLEM: What I'd like to do, however, is allow the user to select text from the currently active document WITHOUT having to de-activate the userform: in exactly the same way that Word's built in find and replace form works. To specify, I'd like my users to be able to click on the currently active document, (have the form temporarily lose focus while the user selects and copies some text into the clipboard), and then allow the user to click the userform, (set the focus to the form again), and paste the text into the find textbox.
C'est possible
Dherai dhanyabaad (thank you very much) in advance for your assistance
Ganeth
THE SITUATION: I have a userform that allows for searching and replacing of text in all open documents. Works just fine. You enter the text to be searched for in one text field, the replace text in another, click OK and off it goes. The code hides the form, cycles through all open word documents, performs the operation on each one, returns to the document which was active when the userform was invoked, queries if the user would like to generate a log file of the changes, and then sets the form to visible again for the user to enter more text to be changed, if he or she so wishes
THE PROBLEM: What I'd like to do, however, is allow the user to select text from the currently active document WITHOUT having to de-activate the userform: in exactly the same way that Word's built in find and replace form works. To specify, I'd like my users to be able to click on the currently active document, (have the form temporarily lose focus while the user selects and copies some text into the clipboard), and then allow the user to click the userform, (set the focus to the form again), and paste the text into the find textbox.
C'est possible
Dherai dhanyabaad (thank you very much) in advance for your assistance
Ganeth