Thanks for the quick reply.<BR>&nbsp;<BR>The line<BR>ppt.WindowSelectionChange += onWindowSelectionChange<BR>doesn't work for me. <BR>&nbsp;<BR>It looks like my ppt object (type __ComObject) doesn't have the&nbsp;WindowSelectionChange attribute (see below for a dir on my ppt object). I've looked at other objects in ppt (ActiveWindow, ActiveWindow.Application, etc.), and I can't find WindowSelectionChange (or any other event) anywhere by running recursive dir() on my ppt object and its attributes.<BR>&nbsp;<BR>I'm puzzled. My ppt object probably isn't the Application object to which event handlers are attached (I'm ashamed to say that I'm not sure what class my ppt object is instantiated from, or what's the type of its attributes). Or maybe I need to do something particular to enable events?<BR>&nbsp;<BR>Any help would be greatly appreciated.<BR>Many thanks,<BR>Julien.<BR>&nbsp;<BR>dir(ppt), where ppt = Marshal.GetActiveObject("PowerPoint.Application")<BR>['Activate', 'Active', 'ActivePresentation', 'ActivePrinter', 'ActiveWindow', 'A<BR>ddIns', 'AnswerWizard', 'Assistant', 'AutoCorrect', 'AutomationSecurity', 'Build<BR>', 'COMAddIns', 'Caption', 'CommandBars', 'CreateObjRef', 'Creator', 'DefaultWeb<BR>Options', 'Dialogs', 'DisplayAlerts', 'DisplayGridLines', 'Equals', 'FeatureInst<BR>all', 'FileFind', 'FileSearch', 'Finalize', 'GetHashCode', 'GetLifetimeService',<BR>&nbsp;'GetOptionFlag', 'GetType', 'HWND', 'Height', 'Help', 'InitializeLifetimeServic<BR>e', 'LanguageSettings', 'LaunchSpelling', 'Left', 'Marker', 'MemberwiseClone', '<BR>MsoDebugOptions', 'Name', 'NewPresentation', 'OperatingSystem', 'Options', 'PPFi<BR>leDialog', 'Path', 'Presentations', 'ProductCode', 'Quit', 'Run', 'SetOptionFlag<BR>', 'SetPerfMarker', 'ShowStartupDialog', 'ShowWindowsInTaskbar', 'SlideShowWindo<BR>ws', 'ToString', 'Top', 'VBE', 'Version', 'Visible', 'Width', 'WindowState', 'Wi<BR>ndows', '__class__', '__doc__', '__init__', '__module__', '__new__', '__reduce__<BR>', '__reduce_ex__', '__repr__']<BR>&nbsp;<BR><BR>De: Kelie &lt;kf9150@gmail.com&gt;<BR>Date: Mercredi, 25 Juin 2008, 3:31<BR>Objet: Re: [IronPython] events in PowerPoint<BR>À: users@lists.ironpython.com<BR><BR>&gt; Not sure if this will help. I wrote something like this a while back,<BR>&gt; probably using IronPython 1.1. And it was for a different software.<BR>&gt; <BR>&gt; import clr<BR>&gt; from System.Runtime.InteropServices import Marshal<BR>&gt; clr.AddReference("Microsoft.Office.Interop.PowerPoint")<BR>&gt; import Microsoft.Office.Interop.PowerPoint as PowerPoint<BR>&gt; ppt = Marshal.GetActiveObject("PowerPoint.Application")<BR>&gt; <BR>&gt; def onWindowSelectionChange(selection):<BR>&gt; &nbsp;&nbsp;&nbsp; print "Window selection changed."<BR>&gt; <BR>&gt; ppt.WindowSelectionChange += onWindowSelectionChange<BR>&gt; <BR>&gt; _______________________________________________<BR>&gt; Users mailing list<BR>&gt; Users@lists.ironpython.com<BR>&gt; http://lists.ironpython.com/listinfo.cgi/users-ironpython.com