Reading MS Word via AS ->crash??
Reading MS Word via AS ->crash??
- Subject: Reading MS Word via AS ->crash??
- From: Charles Arthur <email@hidden>
- Date: Thu, 21 Jun 2001 17:39:04 +0100
So I was trying to set up a simple test for some words in some Word files.
You know the sort of routine -
--
set thefile to choose file --file is a Word 98 file
set openfile to open for access thefile
set thecontents to read openfile
close access openfile
set {od, AppleScript's text item delimiters} to {AppleScript's text item
delimiters, "Hoover"}
set thecontents to text items of thecontents
display dialog (count items of thecontents)
set applescript's text item delimiters to od
--
which works fine with, for example, a quite large Simpletext file. (If the
word you want is in the file you'll have more than 1 item in the list.)
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?
Yes, I know that there are other file formats but this is the one I'm in
and it's not going to change.
Charles
----------------------------
http://www.ukclimbing.com : 1000+ British crags, 350+ British climbing
walls - searchable by distance and anything else you care to think of -
with weather forecasts for every one, plus maps, articles, news and
features. Plus Britain's busiest climbing discussion boards. And there's
even a cool shop attached.