Re: Reading MS Word via AS ->crash??
Re: Reading MS Word via AS ->crash??
- Subject: Re: Reading MS Word via AS ->crash??
- From: Paul Berkowitz <email@hidden>
- Date: Thu, 21 Jun 2001 15:22:32 -0700
On 6/21/01 9:39 AM, "Charles Arthur" <email@hidden> wrote:
>
Tried with a 24K MS Word 98 file, however, leads to Script Editor 1.4.3
(OS
>
904, CarbonLib 1.0.4) going down with all hands.
>
>
Howcome? What is the poison pill in Word file formats? Is there a way
>
around it when working with Word98 files?
Ms Word's applescript implementation is terrible, buggy and virtually always
leads to crashes like that. Except that it has the magic command 'do Visual
Basic'. That gives you access to its VB scripting (as in Word Windows) which
is outstanding and pretty awesome: you can do about 10,000 things with it.
The trouble is - you have to learn VB. (You then put the VB script in
quotes, with suitable treatment for VB line endings and escaping internal
quotes). That's no excuse for such a terrible AS implementation, however.
>
Yes, I know that there are other file formats but this is the one I'm in
>
and it's not going to change.
Then you'd better learn VBA for Word. Make sure you have installed
"Programmability" from the Office CD, go into Tools--> Macros --> Visual
basic Editor. Then, when you get there , to Help --> Contents & Index, for a
great, exhaustive online Help, and a great script editor. Also, buy
O'Reilly's "Writing Word macros", which is excellent. Don't count on Word's
applescript dictionary for anything; it leads only to confusion and crashes,
for the most part.
--
Paul Berkowitz