• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Passing MS Word object specs (Larry the O)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: Passing MS Word object specs (Larry the O)
      • From: Larry the O <email@hidden>
  • Prev by Date: Re: Encoded file URL to Mac or Posix path...
  • Next by Date: Re: Microsoft: the experts in crazy-making
  • Previous by thread: Re: Microsoft: the experts in crazy-making
  • Next by thread: Re: Passing MS Word object specs (Larry the O)
  • Index(es):
    • Date
    • Thread