Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm experiencing a problem when I open a workbook from Internet Explorer (for
example, clicking on a hyperlink to a .xls file) and my system is configured to open Excel in a brower window. If Excel is opened before I click the link in IE then when I close the browser window that was displaying the workbook, an empty workbook named "Object" is left in Excel. Each time and Excel link is opened in IE and then the browser window is closed, additional workbooks named "Object2", "Object3", ... are left open. I tracked the issue to a COM add-in (disabling the add-in caused the problem to go away) and in particular creating an Excel event handler in the add-in. Note: it doesn't appear to matter which event handler is created and the handler doesn't even need to contain any code to make the issue appear. Just defining an event handler in VBA doesn't appear to cause the problem. Has anyone seen this problem or know anything about how to resolve it? It's easy to produce the problem by creating a new Office COM add-in using the Visual Studio project wizard, then add an event handler: // I added the reference to Office PIA for Excel using Excel = Microsoft.Office.Interop.Excel; // This code was generated by the wizard public void OnConnection(object application, Extensibility.ext_ConnectMode connectMode, object addInInst, ref System.Array custom) { applicationObject = application; addInInstance = addInInst; // I added this code Excel.Application excelApp = (Excel.Application)applicationObject; excelApp.WorkbookOpen += new Microsoft.Office.Interop.Excel.AppEvents_WorkbookO penEventHandler(excelApp_WorkbookOpen); } // I added the empty event handler private void excelApp_WorkbookOpen(Microsoft.Office.Interop.Exc el.Workbook Wb) { } |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copying text from a Browser window into Excel | New Users to Excel | |||
Workbooks opening in browser window | Excel Discussion (Misc queries) | |||
Launch new browser window from an excel web page | Excel Discussion (Misc queries) | |||
Hyperlinks opening in new appication/browser window | Excel Discussion (Misc queries) | |||
Opening browser window | Excel Programming |