applescript crashes excel

G

gordon

wrote an applescript to do some filtering, cutting, and pasting into
excel X. working on PB 17". script worked fine before I updated
excel to most current version. what to do? did they change the as
dictionary in the new ver? can I roll back the current update to the
old ver? if so how? any help would be appreciated.
 
J

J.E. McGimpsey

wrote an applescript to do some filtering, cutting, and pasting into
excel X. working on PB 17". script worked fine before I updated
excel to most current version. what to do? did they change the as
dictionary in the new ver? can I roll back the current update to the
old ver? if so how? any help would be appreciated.

In order to help, it would help if you were a bit more specific -
what's no longer working?

Posting your applescript in a reply might be the easiest way for
others to verify or debug the problem.

Don't know if the dictionary changed - all my scripts seem to be
working still.

You can't "roll back" but you can uninstall by running Remove Office
from the Value Pack on the Installation CD, then applying the 10.1.2
and 10.1.4 updates. Make sure you repair disk permissions after
running the updates.
 
J

J.E. McGimpsey

wrote an applescript to do some filtering, cutting, and pasting into
excel X. working on PB 17". script worked fine before I updated
excel to most current version. what to do? did they change the as
dictionary in the new ver? can I roll back the current update to the
old ver? if so how? any help would be appreciated.

Here's what Paul said (thanks, Paul!):
Here's what I find:

tell application "Microsoft Excel"
Activate
Activate Window "Workbook2"
end tell

works under most circumstances, even if it's not yet saved as an .xls file. But
ONLY when Excel itself is in the front - that's what that first "Activate"
means.

Same here:

tell application "Microsoft Excel"
Activate
tell Window "Workbook2" to Activate
end tell


It's the same with Workbook "Workbook2.xls": you first have the Activate
Excel. That's a bug. Furthermore, even that (with both Workbook and Window)
did _not_ work a few times, just as he says. A worse bug. The bug may be
related to OS X's windowing. I don't know. I'll report it it, but since it's
inconsistent when Excel is Activated, I don't know what to say, except
definitely Activate Excel - you can't do this in the background.

In very limited testing I find that Activating the application works
every time. I would not be surprised if it's related to OS X
windowing - I see anomalies all the time when switching back and
forth between XL and the Visual Basic Editor - sometimes the VBE can
be in front with the worksheet active, sometimes the code modules
pop out in front of the worksheet after switching to the worksheet.

OS X windowing is far more complex than OS 8/9 windowing, so it's
hardly surprising that bugs would show up there, I guess. On the
plus side, it has gotten much more stable for me since OS X 10.0 and
Office 10.0 as both MS and Apple build toward a more stable platform.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top