Re: Passing MS Word object specs (Larry the O)
Re: Passing MS Word object specs (Larry the O)
- Subject: Re: Passing MS Word object specs (Larry the O)
- From: Olof Hellman <email@hidden>
- Date: Wed, 14 Mar 2007 22:01:00 -0700
On Mar 14, 2007, at 8:08 PM, Larry the O wrote:
It compiles OK, but I get an error when it tries to do the subroutine
call, and I would bet that it's because AppleScript can't grok the
chunk of data Word is handing it.
Is there a way to do this or is AS just incapable of hacking the
wacky world of Microsoft?
Well, the VB-ish scripting of Mac Office is indeed wacky, but adding
'my' to your script will at least get you a successful subroutine call:
on processText(wholeStory)
beep
end processText
tell application "Microsoft Word"
set wholeStory to (create range active document start 0 end (count
of characters in active document))
my processText(wholeStory)
end tell
You'll probably need another tell block inside the processText code
if you want to do anything useful with wholeStory.
- Olof Hellman
Microsoft MacBU
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden