Please note: This wiki is currently running in test mode after an attack on January 5 2013. All passwords were reset, so you will have to use the password recovery function to get a new password. To edit wiki pages, please log in first. See the wiki attack description page for more details. If you find problems, please report them to the pydotorg-www mailing list.

Powerpoint and Word have extensive Applescript dictionaries.

Here's how to get the path of the folder of the current document in Word, and the name of the file:

  from appscript import *
  a = app("Microsoft Word")
  path = a.active_document.path()
  file = a.active_document.name()
  print path, file

MacPython/Microsoft Word (last edited 2008-11-15 13:59:46 by localhost)