Re: Alternatives to Word (was: Re: Script problems with BBEdit 6.5)
Re: Alternatives to Word (was: Re: Script problems with BBEdit 6.5)
- Subject: Re: Alternatives to Word (was: Re: Script problems with BBEdit 6.5)
- From: Paul Berkowitz <email@hidden>
- Date: Tue, 11 Dec 2001 19:01:52 -0800
On 12/6/01 5:16 PM, "billp" <email@hidden> wrote:
>
What really screws me up is when a client sends over a Word file
>
wherein the tables have somehow been created in and linked to Excel;
>
you cannot, for example, select any text in the table within Word.
>
When you click somewhere on the table, handles appear (as on any graphic)
>
at the corners and in-between. Double-clicking takes you into Excel
>
where, finally, you can access the data at the character level.
>
>
It is an utter pain in the ass to have to double-click each table, go
>
to Excel, select the appropriate rows and columns, go back to Word,
>
delete the chart, and paste the contents of the clipboard (which come
>
in as a Word Table - cells and editable text). I was able to figure
>
out from text that Word was displaying during the process that the
>
graphic was an "EMF file".
>
>
What I cannot figure out how to do is to have AppleScript perceive
>
these things as the kinds of objects they are and to have them
>
automatically
>
converted to the Word Table format. Has anyone out there dealt with
>
this?
>
>
I did record my actions using Script Editor, and the Visual Basic
>
commands that were captured basically called it "Object 25" or "Object 16"
>
or whatever. The problem is that the objects are not necessarily
>
sequential, nor all there. There may or may not be an Object 17 if there's
>
an Object 18. There might be a way to address the object if only
>
AppleScript could figure out what it was called before going after it.
I'm not sure if there's VB code on the Mac for embedded files. But you can
probably automate what you've been doing going from Word to Excel and back.
There is a VB command GetObject which seems designed to do what you're
attempting: - from an example in the VB Help:
This example uses the GetObject function to get a reference to a specific
Microsoft Excel worksheet (MyXL). It uses the worksheet's Application
property to make Microsoft Excel visible, to close it, and so on. Using two
API calls, the DetectExcel Sub procedure looks for Microsoft Excel, and if
it is running, enters it in the Running Object Table.
etc.
What I would suggest is that you ask your questions at these two newsgroups
on the Microsoft News Server ( msnews.microsoft.com):
microsoft.public.word.vba.general
microsoft.public.word.tables
Especially the first. There are some extremely knowledgeable people there.
Check their answers for various methods and properties and check those in
the VB Word Help to make sure they're available on the Mac (it always says
if they're not). And then put it into a 'do Visual basic' applescript
command. Do the whole thing this way - anything in native applescript in
Word is doomed, since the whole thing is so buggy and flimsy. But 'do Visual
Basic' works very well, once you've mastered it.
--
Paul Berkowitz