[IronPython] events in PowerPoint

Kelie kf9150 at gmail.com
Wed Jun 25 09:31:40 CEST 2008


Not sure if this will help. I wrote something like this a while back,
probably using IronPython 1.1. And it was for a different software.

import clr
from System.Runtime.InteropServices import Marshal
clr.AddReference("Microsoft.Office.Interop.PowerPoint")
import Microsoft.Office.Interop.PowerPoint as PowerPoint
ppt = Marshal.GetActiveObject("PowerPoint.Application")

def onWindowSelectionChange(selection):
    print "Window selection changed."

ppt.WindowSelectionChange += onWindowSelectionChange




More information about the Ironpython-users mailing list