Can’t set IHTMLEventObj2::fromElement
Just a wild shot in the dark but could it be because your passing a “null” object to the CreateEventObject method? What about if you change this: Object o = null; To this: Object o = new Object(); On line 3 of your example?