Re: Applescripting Office X
Re: Applescripting Office X
- Subject: Re: Applescripting Office X
- From: Paul Berkowitz <email@hidden>
- Date: Sat, 03 Jan 2004 09:50:38 -0800
--
Paul Berkowitz
>
From: "Claude M. CAUWE" <email@hidden>
>
Date: Sat, 3 Jan 2004 18:03:36 +0100
>
To: <email@hidden>
>
Subject: Applescripting Office X
>
>
I have lots of trouble porting an lawyer's office administrative system
>
which relies mainly on a FileMaker set of databases and Applescripts
>
transferring names, addresses and case references to MS Word (initially
>
Office 98) for mail redaction.
>
>
In OS 9, simple commands like
>
>
tell application "Microsoft Word"
>
activate
>
set cell 2 of table 1 of front document to customerAddress
>
save front document in folderPath & folderName & ":" & saveName
>
end tell
>
>
worked perfectly. Now, with the upgrade to Panther (and, subsequently
>
to Office X), i'm dumped in big trouble because none of the simple
>
commands (make new table, set cell .. of table .., etc) works anymore.
>
>
For some of them, i for sure can use the "do Visual basic" command,
>
followed by the reference of the table to be created.
>
But my most important trouble remains to SET the CELLS of the newly
>
created table... I need to put variables in these celles, thos
>
variables being the names and case references, etc..., which come from
>
FileMaker...
It's all doable via 'do Visual Basic', which is the only way you're going to
be able to do it in any current version of Word. Unfortunately, it does mean
learning some of the basics of another scripting language - VBA. The VBA
Help in Visual Basic Editor is actually very good and you could learn what
you need to do by following the Help and Examples there. An excellent primer
is the O'Reilly book "Writing Word Macros": it presents a clear and orderly
tutorial for learning VBA for Word. It's quite possible to set the content
of table cells in VBA.
For some guidance on using 'do Visual Basic', including incorporating
AppleScript variables into 'do Visual Basic' commands, see
<
http://www.mvps.org/word/FAQs/WordMac/WordAppleScript.htm>
But you have to go there in Internet Explorer - it comes up blank in Safari.
For some more advanced examples specifically of using tables in AppleScript,
you might want to work your way through the 'do Visual Basic' parts of my
script "Print Tasks Lists", which you can get at
MacScripter.net <
http://macscripter.net/scriptbuilders/>
>
>
Ant help would be grandly appreciated, for no litterature already
>
exists on how to Applescript Word X.
See the web page above.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.