Re: "Do Visual Basic" crashes Word
Re: "Do Visual Basic" crashes Word
- Subject: Re: "Do Visual Basic" crashes Word
- From: Paul Berkowitz <email@hidden>
- Date: Mon, 04 Dec 2006 21:00:03 -0800
- Thread-topic: "Do Visual Basic" crashes Word
On 12/4/06 2:31 PM, "Ted Fitzpatrick" <email@hidden> wrote:
> I have a script that uses the following syntax to command Word to run a VBA
> macro:
>
> Do Visual Basic "Application.Run\"MacroSubroutineName\""
>
> This works fine on pre-Intel machines, and was originally working on my
> MacBook Pro (when I tested it several months ago.) I tested again several days
> ago, and MS Word is crashing upon the second macro call ? AppleScript then
> displays error *-609 "Connection is Invalid" because MS Word died. Anyone have
> a similar experience?
>
> As far as changes I made to my MacBook from several months ago to several days
> ago, I've only done the Apple updates, and I have the most recent version of
> MS Word 2004. I did install a couple of dashboard widgets, can't imagine how
> these would trip up the OSA.
>
> My config: [Intel MacBook, Tiger 10.4.8, MS Word 11.3 (060914)]
'do Visual Basic' should run in Rosetta. But why ever do you need it for
that command in Word 2004? There's absolutely no need.
Replace it with
run VB macro "MacroSubroutineName"
If it still crashes, try running the macro from VB Editor
(Tools/Macro/Macros.../[select macro]/Run. Does that crash too? If so, then
the problem is with the macro, not AppleScript.
--
Paul Berkowitz
_______________________________________________
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/mailman//archives/applescript-users
This email sent to email@hidden