Hello,
Last week I’ve used this script (found on the internet) to search for any text on the Clipboard in a Word document on the second screen.
After today’s update of MS Office 2011, the macro doesn’t work anymore.
tell application “Microsoft Word”
set MyDoc to active document
set FindText to (the clipboard as text)
set findRange to find object of selection
clear formatting findRange -- clear any previous formatting used in a find operation
set forward of findRange to true -- find forward
set wrap of findRange to find continue
set foundIt to false --initialize found indicator
--this locates the text
tell findRange
set foundIt to execute find find text FindText -- do the search true-found false-not found
end tell
end tell
I get an error in the second line:
“Expected end of line but found class name”.
(I’m a total newbie to AS.)
Thanks for any help!
Cheers,
Hans