Excel Add-In with WorkbookOpen event causes error in Word

EDIT: New information
I have narrowed the problem to a specific code. Following code produces the error message (see below in the original part):
public partial class ThisAddIn
private void ThisAddIn_Startup(object sender, System.EventArgs e)
Globals.ThisAddIn.Application.WorkbookOpen += Application_WorkbookOpen;
void Application_WorkbookOpen(Excel.Workbook Wb)
int i = 0;
private void ThisAddIn_Shutdown(object sender, System.EventArgs e)
#region VSTO generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InternalStartup()
this.Startup += new System.EventHandler(ThisAddIn_Startup);
this.Shutdown += new System.EventHandler(ThisAddIn_Shutdown);
#endregion
It does not matter whether I unregister the WorkBookOpen event in the ThisAddIn_Shutdown method or not. Whenever this piece of code is present Word gives me the error.
It seems to be a bug in Excel. Can anyone test and confirm my assumption? Does anyone know a workaround?
ORIGINAL
I have a problem with my Excel add-in (VSTO) in a very specific situation. For some reason I can't debug the add-in when it is happening.
In Word it is possible to insert and edit OLE objects. In this specific situation a user wants to insert and edit an Excel sheet (INSERT -> Table -> Excel Spreadsheet).
Let's say that Excel is not running. In an ideal world the Excel process is started by Word when the user edits the spreadsheet. The Excel process is terminated when the Word document is closed. This works fine, if my Excel add-in is deactivated.
If the Excel add-in is activated the user cannot edit the spreadsheet in Word. An error with following message is shown within Word: "The program used to create this object is Excel. That program is either not installed on your computer or it is
not responding. To edit this object, install Excel or ensure that any dialog boxes in Excel are closed". Also the Excel process which was started by Word is not terminated when closing the document or exiting Word. Excel started by the user does not give
any error message. No dialog is opened. The add-in works fine. So there must be an error with the Excel add-in when Excel is started by Word.
I can reproduce the error with and without an attached debugger (Visual Studio). But for some reason there is no exception caught by Visual Studio while the error is happening.
Can anyone help me how to investigate on that error?
Yavuz

Hi Yavuz,
Based on my investigatiton, when the Excel doesn't start up by user the add-in would shut down immediately. So when the workbook open event was fired the callback already be relreased.
As a workaround, we can use application.UserControl to detect whether the Excel applicaiton was started by user. And here is the code for your reference:
private void ThisAddIn_Startup(object sender, System.EventArgs e)
if(Application.UserControl)
Globals.ThisAddIn.Application.WorkbookOpen += Application_WorkbookOpen;
Please let me know whether it works for you.
Regards & Fei
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.

Similar Messages

  • Excel Add-In with Terminal Services

    Hello Everyone<BR><BR>Does anyone have any experience using the Excel Add-In with a terminal services session (remote desktop)? Local box administrators have no issues but when a non admin user starts MS Excel, they get a VBA runtime error (essexcln.xll not found) Closing that window and attempting to install the add-in via Tools >> Add-Ins >> and browsing to the essexcln.xll file returns the error "essexcln.xll is not a valid add-in"<BR><BR>Seems to be a rights issue but the users have full rights to the folder where the add-in is located (Hyperion\AS\bin\) .<BR><BR>Thanks in advance for any tips.

    Check the file permissions on c:\winnt\system32\msvcr71.dll. This needs to be 'Read/Execute' for 'everyone'. The add-in installation only gives permissions to the User who is installing the add-in. Which causes problems when other users need to access the Add-in. (Similar problem on Citrix / TS). <BR><BR>James Archer

  • Did recent recommended update cause incompatibility with HP printer, causing error message and printer to print blank pages?

    did recent recommended update cause incompatibility with HP printer, causing error message and printer to print blank pages?

    Why not contact HP tech support for assistance since they make the printer. While on their site you can look for an updated printer driver. Otherwise, try deleting the current installed driver, reset the print system, then reinstall your printer's driver.
    Mac OS X- How to reset the printing system

  • Using Bloomberg Professional Excel Add-In with Parallels and Vista

    Has anyone successfully used the Bloomberg Excel Add-In for Excel 2007, Windows Vista, and Mac OS 10.5#? Bloomberg professional works fine, but I can't get any data to populate with the BDS(), BDH() or BDP() functions.

    Check the file permissions on c:\winnt\system32\msvcr71.dll. This needs to be 'Read/Execute' for 'everyone'. The add-in installation only gives permissions to the User who is installing the add-in. Which causes problems when other users need to access the Add-in. (Similar problem on Citrix / TS). <BR><BR>James Archer

  • Problem: Excel Add-in with Excel 2010

    I recently installed the essbase spreadsheet add-in onto Excel 2010 and it worked fine,(previosuly there was 9.3.1 Excel add-in and i removed and installed Excel add-in 11.1.2.2) but after some days it is giving beolw messgae:-
    Excel experienced a serious problem with the 'c:\hyperion\analyticservices\bin\essexcln.xll' addin. . . .Do you want to disable this add-in?
    Has anyone else seen this error, know of a work around or whether a new version is in the works?

    This generally happens if your excel gets crashed due to some reason / your system gets force shutdown. As suggested above, you can enable it.
    Note: When you get that message to disable, do not click yes.
    Regards
    Amarnath
    ORACLE | Essbase

  • Modules with Halo Theme causes errors in other modules with Spark theme

    Hi,
    We have a large application which calls several modules, some old and some new.
    Most modules and the main App are using only MX components and were styled based on default mx theme, thus we want to compile these modules with the flag to use the old Halo theme.
    But when we did this our new module that contains spark components (Which isn't compiled with this flag) couldn't find the default skin for the spark components.
    Using the -keep-all-type-selectors flag didn't work in this case.
    Only when we removed the Halo theme flag from other modules and main app it worked.
    Is there any other option?
    Because using the old modules with spark theme causes major change in the appearance of our application.
    Thanks,
    Dafna.

    I think if you mix themes you'll need to specify more styles on the
    non-default theme because the set of globals and other defaults will be
    different.

  • MDS Excel add-in with Excel online

    Hi,
    I would like to explore the possibility to use excel online (excel services in SharePoint) to administer MDS-data using the Excel add-in. Since there is a need to reach the Master Data menu options in the Excel sheets for the simple reason of publishing
    I have not yet found a way to make this possible since the SharePoint excel online menu options are restricted.
    Does anyone have any experience of using Excel MDS add-in through SharePoint Excel SErvices?
    ...or a similar problem allowing Excel online to show (and use) the menu bar?
    (Would like to avoid rolling out Excel add-in on all clients...) 
    Best Regards,
           Per

    Any suggestions for Per?
    Thanks!
    Ed Price, Azure & Power BI Customer Program Manager (Blog,
    Small Basic,
    Wiki Ninjas,
    Wiki)
    Answer an interesting question?
    Create a wiki article about it!

  • Executing a report with stored procedure causes error

    Hello,
    I've got a .NET application where a report gets generated from an .rpt template using Crystal Reports. A template has been created using the fields from stored procedure. While creating the template, I've been working with my DEV environment DB server, and with that server the .rpt has been saved. Within the Designer, I can preview the report, all working fine.
    Using the template with my application, if I set in the code for crystal connection to use the same DB server as has been saved with the .rpt, the report runs and I do get the result in my application as expected. But if I move my code to other environment, using another DB server (but not changing anything in the .rpt), while running the report in the application I get the following error:
    Exception: CrystalDecisions.CrystalReports.Engine.InternalException
    Message: Failed to open a rowset.
    Details: ADO Error Code: 0x
    Source: Microsoft OLE DB Provider for SQL Server
    Description: Could not find stored procedure 'BreachOfAgg'.
    SQL State: 42000
    Native Error:
    Failed to open a rowset.
    Error in File C:\Windows\TEMP\Breach of Aggregate Stop Loss {196B84E5-7DAE-465E-A12D-5C70DDC04CE5}.rpt:
    Failed to open a rowset.
    Source: CrystalDecisions.ReportAppServer.DataSetConversion
       at CrystalDecisions.ReportAppServer.ConvertDotNetToErom.ThrowDotNetException(Exception e)
       at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext)
       at CrystalDecisions.CrystalReports.Engine.FormatEngine.ExportToStream(ExportRequestContext reqContext)
       at CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToStream(ExportOptions options)
       at CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToHttpResponse(ExportOptions options, HttpResponse response, Boolean asAttachment, String attachmentName)
       at CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToHttpResponse(ExportFormatType formatType, HttpResponse response, Boolean asAttachment, String attachmentName)
       at IFG.ReportsModule.Reporter.CrystalReporter.Export(OutputType outputType, HttpResponse response, String reportName, Boolean asAttachment)
       at IFG.ReportsModule.Reporter.CrystalReporter.Export(OutputType outputType, HttpResponse response, String reportName)
       at IFG.ReportsModule.Proxies.CrystalReporterProxy.ShowResult(OutputType outputType, HttpContext context, CrystalReporter cr)
       at IFG.ReportsModule.Proxies.CrystalReporterProxy.ExecuteReport(ParametersValues parameters, OutputType outputType, HttpContext context)
       at IFG.Web.GetReport.GenerateReport(Int64 reportID) in d:\Jure\PSL\iFish\IFISHRSF\IFISHRSF0100\Root\5. Development\IFISH Portal\SDRMA New\Portal\web\admin\RSF\GetReport.aspx.cs:line 82
       at IFG.Web.GetReport.Page_Load(Object sender, EventArgs e) in d:\Jure\PSL\iFish\IFISHRSF\IFISHRSF0100\Root\5. Development\IFISH Portal\SDRMA New\Portal\web\admin\RSF\GetReport.aspx.cs:line 48
    Nested Exception
    Exception: System.Runtime.InteropServices.COMException
    Message: Failed to open a rowset.
    Details: ADO Error Code: 0x
    Source: Microsoft OLE DB Provider for SQL Server
    Description: Could not find stored procedure 'BreachOfAgg'.
    SQL State: 42000
    Native Error:
    Failed to open a rowset.
    Error in File C:\Windows\TEMP\Breach of Aggregate Stop Loss {196B84E5-7DAE-465E-A12D-5C70DDC04CE5}.rpt:
    Failed to open a rowset.
       at CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Export(ExportOptions pExportOptions, RequestContext pRequestContext)
       at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext)
    If I open in the Crystal Designer the rpt and change the DB to my new server, and then run the report in the application using that same new server, the report runs ok and I do get the results. As well, I don't have this problem using tables or views in the report. Independent of what server has been used while created the .rpt in the Designer, I get the report ran and presented according to the server that I point to within my code.
    I hope someone can help me out with thi.
    Thank you.
    Jure

    Hi Jure,
    All I can suggest now is you try this [app|http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_bi/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333533353333333933323331%7D.do]:
    It will get the connection if you need.
    If that doesn't work the purchase a support and Rep can connect to your PC to see what is going on...
    Thanks
    Don

  • Installing Essbase 11.1.1.2 Excel Add In - Help needes as getting error

    Hi,
    I have done these steps:
    1 - Unzipped the V15966-01 file into install directory.
    2 - Unzipped the V16855-01 file into the install directory.
    3 - Unzipped the V15981-01 file into the install directory.
    When I goto run the install and I get to the screen to choose Essbase 32bit Client. It does not allow me to install and comes up with this error:
    Assemblies missing: Component required next assemblies to be installed: commonComponents.
    Any idea what I'm missing?
    Thanks

    Resolved.. Had incorrect file listed.
    Correct files should be:
    1 - Unzipped the V15966-01 file into install directory. (Installer)
    2 - Unzipped the V16851-01 file into the install directory.(Foundation Services #1)
    3 - Unzipped the V15981-01 file into the install directory.(Essbase Client)

  • Excel Add-in error v11.1.1.3

    A user just installed Excel Add-in v11.1.1.3 on her windows XP running Excel 2003.
    She is experiencing an error whenever she tries to print a report from ORACLE ADI. ADI runs for a couple of mins, after which it generates report, that’s when she gets this error message:
    ‘error – excel failed to open’
    I uninstalled Excel Add-in and ORACLE ADI started to generate report fine.
    Maybe a quick workaround would be for her to deregister Essbase when she is not using it?
    Anyone else experiencing this?
    Edited by: Essbase Fan on Oct 29, 2010 12:29 PM

    Hi Hari,
    We worked with oracle on this , and here are the steps provided by them
    If you do not use the Visual Explorer functionality from within Essbase Excel Add-in, you can eliminate the error by renaming two files.
    1. Navigate to the \Hyperion\products\Essbase\EssbaseClient\bin directory
    2. Rename the file so the extension is not an executable, i.e. hve.exe to hve.exe.ORIG
    3. Rename the DLL file so it is not a valid data link library file, i.e. hve.dll to hve.dll.ORIG
    and also bug has been raised with number 8214299.
    Sandeep Reddy Enti
    HCC
    http://hyperionconsultancy.com/

  • Excel Add-in Error.

    Hi Guys,
    I have got the below error when I retrieve the data in Excel add-in:
    ESSBASE ERROR:
    Essbase has encountered an internal excel error. Your sheet will not be over written and none of your data will be lost. However, you are strongly urged to exit excel and restart in order to clear up the problem.
    Many Thanks,

    Hi Hari,
    We worked with oracle on this , and here are the steps provided by them
    If you do not use the Visual Explorer functionality from within Essbase Excel Add-in, you can eliminate the error by renaming two files.
    1. Navigate to the \Hyperion\products\Essbase\EssbaseClient\bin directory
    2. Rename the file so the extension is not an executable, i.e. hve.exe to hve.exe.ORIG
    3. Rename the DLL file so it is not a valid data link library file, i.e. hve.dll to hve.dll.ORIG
    and also bug has been raised with number 8214299.
    Sandeep Reddy Enti
    HCC
    http://hyperionconsultancy.com/

  • Excel Add-in issue!

    Hi,
    we are using essbase 7.x and excel 2003. The issue is that when we open the excel add-in with the
    application, it going to sheet2 instead of sheet1 by default. and moreover we are trying to have only 3 sheets when we open excel. It is displaying 15 sheets.
    Is there any setting that needs to be taken care as part of Excel for Essbase?
    Kindly help me out in this regard
    Thanks

    The 15 sheet issue can potentially be caused by an excel option, unrelated to essbase.
    To change the setting, go to the Tools/Options menu. On the Options dialog select the General tab and you should see a setting for "Sheets in new workbook" about half-way down. The default is 3, but if this were changed to 15, new workbooks would always begin with 15 tabs.
    As for the Sheet2 default, once a workbook is saved, the default tab is the tab that was active when the workbook is saved.
    However, macros can always cause either of the two conditions above to be reset/modified. If that is happening, find the offending application and hit it with a hammer. I'm kidding here, of course -- it needs a screw driver.

  • Y-T-D Value Essbase Excel Add-in Failure

    <p> </p><div>This is very strange.  I have a valid intersection whereI can see current values in analyzer.<br><br>Yet using the excel add-in with exactly the same POV i getzero's.</div><div> </div><div>But it gets weirder.</div><div> </div><div><span class="054245302-15032006"><font size="2" color="#0000ff" face="Arial">If I change Jan to Jan in my column headeras opposed to Y-T-D (Jan)and leave the rest of the months Y-T-D(Feb)I get Jan data and miraculously Feb year to date data but the restof my Y-T-D months continue to retrive zeros.</font></span></div><div><span class="054245302-15032006"><font size="2" color="#0000ff" face="Arial">If I then change Y-T-D(Feb) to Febyou guessed it - I get Jan and Feb data and YTD(Mar) is now retrieving but none of the other Y-T-D months from Aprforwards.</font></span><br></div><div><br>Anybody ever seen anything like this? </div><div></div>

    I have tested again today, and it works fine now with Classic Excel Add In and with Smart View. (Sorry, I dont know what I did that was wrong).
    The only problem with SmartView is that the current release does not support hiding #Invalid rows.
    Philippe

  • Add-on 9000005 failed with exception; Event Type: 1

    Hi Experts,
    I am woking on a project which uses DI API and creates AP Invoice by reading an excel file.
    I used all the invoice in one sap transaction.
    I read excel line by line and create one AP Invoice per line. It works when excel is having less then 500 records. But if there are more then 500 records or more then 600 records, it give following error to me
    Add-on 9000005 failed with exception; Event Type: 1
    Can anyone help me in it?
    Thanks!!
    Ritu

    Hi,
    I'm sure there is a limit to the number of rows you can add to an Invoice but I think it's probably limited on memory rather than a fixed limit on the number of rows.  This might be an out of memory error that's causing the exception.  Have you tried putting a try/catch around your code to see what the exact details are of the exception?  Also, if you are filling in any text fields on the invoice (remarks), they are limited to 30K.
    David

  • Code 91 - Caused Error: (Object variable or With block variable not set)

    Hi,
    We are using FDM 9.3.1. We have enabled batch processing.
    We are having following process being followed
    - Batch Loader script will pull the data from dwh table for each entity, scenario, year and period
    - Batch processing is set to serial and processlevel set to Up-To-Check
    - We had following five files created for Location - EMAFF100
    i. 1_EMAFF100_ACT_May-2011_RR.txt
    ii. 1_EMAFF100_ACT_Jun-2011_RR.txt
    iii. 1_EMAFF100_ACT_Jul-2011_RR.txt
    iv. 1_EMAFF100_ACT_Aug-2011_RR.txt
    v. 1_EMAFF100_ACT_Sep-2011_RR.txt
    Batch loader process completed the processing for May - 2011, Jul - 2011, Aug-2011, Sep-2011.
    But for Jun 2011 it has given the following error in the 'tbatchinformation' table and failed at import stage.
    40751.6239236111 1_EMAFF100_ACT_JUN-2011_RR.TXT 2 2 91-Object variable or With block variable not set
    When we checked the view error log from tool menu we found following
    ** Begin FDM Runtime Error Log Entry [2011-07-27-14:58:29] **
    ERROR:
    Code......................................... 91
    Description.................................. File [1_EMAFF100_ACT_Jun-2011_RR.txt] Caused Error: (Object variable or With block variable not set)
    Procedure.................................... clsBatchLoader.mFileCollectionProcess
    Component.................................... upsWBatchLoaderDM
    Version...................................... 931
    Thread....................................... 5600
    IDENTIFICATION:
    User......................................... ncreighton
    Computer Name................................ HYAPSDEV1
    App Name..................................... EMATTEST
    Client App................................... WebClient
    CONNECTION:
    Provider..................................... ORAOLEDB.ORACLE
    Data Server..................................
    Database Name................................ hydev_serv
    Trusted Connect.............................. False
    Connect Status.. Connection Open
    GLOBALS:
    Location..................................... EMAFF100
    Location ID.................................. 762
    Location Seg................................. 16
    Category..................................... ACT
    Category ID.................................. 13
    Period....................................... Jun - 2011
    Period ID.................................... 30/06/2011
    POV Local.................................... False
    Language..................................... 1033
    User Level................................... 1
    All Partitions............................... False
    Is Auditor................................... False
    We then re submitted data for Jun period and saw batch process got successfully completed and June data got imported successfully and also rest other processes got through.
    Can any one provide exact cause for this error? As we have automated the data load from DWH to FDM And then to HFM. Hence when such error comes it disturbs lot of processing there on. Appreciate your early response.
    Thanks in advance.

    Hi SAP collegues,
    At my site, BPC Excel created this problem too "Object Variable or With Block Variable not set" .
    It turned out that this is symptom of a a dys-functioning BPC COM Plug-in in XL2007 or XL2010!
    This is a consequence that your Excel recently crashed while using BPC. And it relates to an Excel Add-in becoming disabled when the applications crashes.  Please check the following.
    Note before doing the following, close all other open Excel and BPC sessions.
    Within Excel go to File à Options
    Select the Add-Ins option on the left
    Select the <<COM Add-ins >> option in the Manage drop down, and click Go
    Make sure that the Planning and Consolidation option is selected.  If not, mark this box and click OK.
    If you do not see anything listed, return to the Add-in screen and select the Disabled Items option, and see if Planning and Consolidation is listed there.
    Let me know if you have any queries,
    Kind Regards,
    robert ten bosch

Maybe you are looking for

  • Print booklet to pdf?

    I'm trying to export a .pdf file where the pages are in print order, not viewing order (i.e., where they're already imposed). The Print Booklet feature of InDesign (File > Print Booklet) works fine for reordering the pages and then printing them, but

  • Streams

    I am trying to replicate 2 tables from 10gR2 to 11gR1 using streams. I am new to streams based replication and just started reading through the documentation to get this set up.I used the following web link http://www.oracle.com/technology/oramag/ora

  • How can I erase the pictures in my iphone4s

    How can I erase the photos in my phone.

  • Problem accessing sessionScope after logout

    Hello, after logout (session.invalidate) I cannot use ADFContext.getCurrent().getSessionScope().put(...) (java.lang.NullPointerException) How to recreate sessionScope? After logout not secured part of our application must be still functioning. Rado

  • Hello, relay access denied error

    Hello, can someone help me with such thing: need to configure c170 as mail gateway for postfix. the thing is, i've done all the initial setup, set RAT to accept all emails for my domain and for other domains, as i use one interface deployment solutio