When pasting a Microsoft Excel object into a PowerPoint presentation as an embedded object (i.e. a chart as a chart not as an image), the in-place editing fails if an instance of Excel (with a Vb.Net Add-In, which handles Excel.Application events, installed) is open. It fails with a generic add-in problem. The failure does not occur when Excel is closed or after the instance from which the object was posted is closed. Vb.Net Add-Ins which does not handle Excel.Application events seems to be working fine! Please help!!
Error: "Microsoft cannot start the application required to open this object"
My Connect Class:
Using Addhandler instead of the WithEvents keyword resulted in the same error...
Public Class Connect
Implements Extensibility.IDTExtensibility2
Dim WithEvents applicationObject As Excel.Application
Dim addInInstance As Object
Public Sub OnConnection(ByVal application As Object, ByVal connectMode As Extensibility.ext_ConnectMode, ByVal addInInst As Object, ByRef custom As System.Array) Implements Extensibility.IDTExtensibility2.OnConnection TryMsgBox("OnConnection")
applicationObject = application
addInInstance = addInInst
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub Private Sub applicationObject_WorkbookOpen(ByVal Wb As Excel.Workbook) Handles applicationObject.WorkbookOpen TryMsgBox(Wb.Name)
Catch ex As ExceptionMsgBox(ex.Message)
End Try End Sub Public Sub OnBeginShutdown(ByRef custom As System.Array) Implements Extensibility.IDTExtensibility2.OnBeginShutdown End Sub Public Sub OnAddInsUpdate(ByRef custom As System.Array) Implements Extensibility.IDTExtensibility2.OnAddInsUpdate End Sub Public Sub OnStartupComplete(ByRef custom As System.Array) Implements Extensibility.IDTExtensibility2.OnStartupComplete End Sub Public Sub OnDisconnection(ByVal RemoveMode As Extensibility.ext_DisconnectMode, ByRef custom As System.Array) Implements Extensibility.IDTExtensibility2.OnDisconnection End SubEnd
Class
Pasting Excel Chart into PowerPoint
zhuyanjun
Jan,
Thanks for your question. As this is an IDTExtensibility2 add-in related question, your best bet is to ask your question to the related newsgroup. See below for the link.
http://msdn.microsoft.com/newsgroups/default.aspx dg=microsoft.public.office.developer.com.add_ins&lang=en&cr=US
Regards,
Eric