Python COM for Microsoft Project

Mark Barclay mark_barclay at datacruz.com
Mon Oct 15 21:20:35 EDT 2001


Mike,

For the "list of objects" (classes, actually) that Microsoft Project exports
(if it behaves like their other VBA enabled applications), simply do the
following:

Run Microsoft Project
Select menu: Tools -> Macros-> Visual Basic Editor
Select menu: View -> Project Explorer
In the first list box, select the application itself, and you will see the
API, annotated by class.

I hope this helps.
Mark

"Mike Brenner" <mikeb at mitre.org> wrote in message
news:mailman.1003186882.938.python-list at python.org...
> Has anyone played with Python to control Microsoft Project?
>
> It is, of course, easy to open a MP file:
>
> from win32com.client import Dispatch
> mpApp = Dispatch("MSProject.Application")
> mpApp.Visible = 1
> mpApp.FileOpen ("C:\Documents and Settings\projectA.mpp")
> # Warning: works only with absolute file names.
>
>
> For the next line of code, I would like to resave the file as a
tab-delimited file for further processing in Python. Actually, I will build
a robot that opens all the MP files and resaves them.
>
> - Is there a URI to download the objects and methods that are now
available?
>
> - Or is the list of objects somehow hidden inside my Visual Studio or my
Microsoft Developer CDs?
>
> - Or do I need to buy Visual Basic for Applications or some other
application to gain access to the objects?
>
> - Is there an upgrade to the COM object browser that comes with Python for
Windows?
>
> Thanks
> Mike Brenner
>
>





More information about the Python-list mailing list