Opened 11 years ago

Closed 10 years ago

#2316 closed Bug (Fixed)

PowerPoint COM event handler initialization error

Reported by: anonymous Owned by: Jon
Milestone: Component: AutoIt
Version: Severity: None
Keywords: Cc:


I'm getting this error while trying to initialize a com event handler for Office PowerPoint events:

err.number is: -2147316576
err.windescription: Type mismatch.

The code i run is:

Local $oMyError = ObjEvent("AutoIt.Error","MyErrFunc") ; Initialize a COM error handler

Local $AppPowerPoint = ObjCreate("PowerPoint.Application")

If Not IsObj($AppPowerPoint) Then
	MsgBox(0, "Error", "$AppPowerPoint is not an Object.")
	MsgBox(0, "Error", "Successfully created Object $AppPowerPoint.")
Local $pptEvt = ObjEvent($AppPowerPoint, "PowerPointEvent_") ; Initialize PowerPoint COM event handlers

Func MyErrFunc($oError)
	ConsoleWrite("err.number is: " & @TAB & $oError.number & @CRLF & "err.windescription:" & @TAB & $oError.windescription & @CRLF)

The error occurs on the line:
Local $pptEvt = ObjEvent($AppPowerPoint, "PowerPointEvent_") ; Initialize PowerPoint COM event handlers

and happens on Version and (Beta), but not on

Tested on Win8 x64 and Win7 x64

Relevant thread:

Attachments (0)

Change History (4)

comment:1 Changed 10 years ago by Jon

  • Resolution set to Rejected
  • Status changed from new to closed

comment:2 Changed 10 years ago by Jpm

In fact As I am not and COM expert I cannot give definitive answer.

But What I can say is the COM error handling has been fied.
I you run under at least under Win8 with Powerpoint 2010 you get a recursive calls to the errorhandler just returning 0 for any err information.

I suspect the problem is really around PowePoint itself.

comment:3 Changed 10 years ago by Jon

  • Resolution Rejected deleted
  • Status changed from closed to reopened
  • Version changed from to

comment:4 Changed 10 years ago by Jon

  • Milestone set to
  • Owner set to Jon
  • Resolution set to Fixed
  • Status changed from reopened to closed

Fixed by revision [9536] in version:

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

as closed The owner will remain Jon.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.