AppleScript and VBA Extract Word Properties

I have reposted this question having gleaned a bit more info.

I want to get the content of the properties (Summary) in Word documents, I understand that this can be done using VBA.

This link shows how to use VBA to extract said properties:

http://support.microsoft.com/?kbid=212724

How do I implement these from AppleScript so that the properties are returned as variables? I get TmpDDE errors and that’s it.

Thanks,

P.

Post what you tried using.
What version of Word?

I don’t have Word 2004 which is supposed to have the largest AppleScript dictionary of any application ever so it’s possible you can do this without having to resort to the kludge I’m about to present. In older versions of Word, however, the best you can do is to use the “do Visual Basic” command to execute a VBA for Word script. The problem with this, and it is a huge problem, is that you cannot get Word to return a value from a VBA command issued this way. You can have it enter a result in your document and then read that text or, as I do in the following script, you can write the result to a file in your temporary items folder and then read the result. So, here’s a script that will get Word to read a property from the current document, write that property to a temp file, then the script will read the file and get the result. Make sure you’ve got a document open in Word that has the properties for which you’re looking.

Jon


[This script was automatically tagged for color coded syntax by Convert Script to Markup Code]

Good one, this solves the problem!

Wonder if 2004 handles this better?