I want to be able to search for a word or phrase in a Word document, then make it the selection, so that I can then do things with that selection such as insert a large chunk of text (find and replace only allows a replacement of up to 255 characters and I need to do more than this). If I could get the bit of code working below it would give me the tool to do the various things i need:
tell application "Microsoft Word"
set myFind to find object of text object of active document
clear formatting myFind
clear formatting replacement of myFind
tell active document
execute find myFind find text "some text" wrap find find continue
--Make the text that is found the current selection - THIS IS THE KEY LINE I'm having trouble with
--Then i can do something with the selection such as insert text.
end tell
end tell
Many Thanks, HJ