• 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
Passing MS Word object specs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Passing MS Word object specs


  • Subject: Passing MS Word object specs
  • From: Larry the O <email@hidden>
  • Date: Wed, 14 Mar 2007 16:52:44 -0700

Well, since my last appeal to this list sparked such a great conversation, I'll try it again.

I've written a whole bunch of code that searches for text in MS Word and modifies it as desired. Just to get it working, I wrote it all as one big monollthic block of code, but I'd like to break it up into subroutines. The problem is that I need to pass stuff like MS Word text objects, text ranges, and so forth. I tried using standard parameter passing like this:

tell application "Microsoft Word"
set wholeStory to (create range active document start 0 end (count of characters in active document))
processText(wholeStory)
end tell

on processText(wholeStory)
....do stuff...
end processText

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?

Thanks!

Larry the O
set wh      
 _______________________________________________
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

  • Prev by Date: Re: InDesign: Name of Paragraph Style
  • Next by Date: time to gmt
  • Previous by thread: Re: InDesign: Name of Paragraph Style
  • Next by thread: time to gmt
  • Index(es):
    • Date
    • Thread