How to check from code in Excel Addin that Excel is embedded in Microsoft word

We've developed an Excel Addin in C# for Excel 2010 and it works perfectly OK. But one issue is reported very recently as below.
1. Microsoft word document is created with an embedded excel work sheet.
2. Save the document and close.
3. Open the word document and try to edit the work sheet there.
4. Following error comes.
"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."
5. This is because, our Addin is initialized and one excel process is running.
6. If the Excel Addin is disabled, above work flow works correctly.
Please let me know how to determine from the Excel Addin that the excel worksheet is embedded in another applicatoin. Because I want to disable the Addin in those cases and enable it if the Excel is opened standalone. The Addin is developed in C#.

Hi,
Since the error message, please try to install this Hotfix test if it works:
http://support.microsoft.com/kb/2596494
Note: Delete the Excel instance running in the background(Go to your task manager and delete it) before opening your Word document and edit your embedded Excel.
If the issue still exists, please see the article and try the solution which I copied here:
"The basic simple answer is to place a Marshal.ComReleaseObject(Wb) at the end (or better, in the Finally block) of your event handlers. This will properly allow Word and excel to handle the OLE communication by not having VSTO hang on to an instance
handle of the workbook, therefore causing the error.
And this is not carte blanche to start placing ComReleaseObject() all over your code. I have found VERY VERY few limited cases where using ComReleaseObject() in an add-in necessary. And this is one of them."
http://davecra.com/2012/10/09/vsto-and-comole/
Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.
Regards,
George Zhao
TechNet Community Support

Similar Messages

  • How to check the code of spawned report

    Hi All,
    I've to modify a standard report from PA module.The report name is "PRC: Distribute Usage and Miscellaneous Costs"
    The executable method is SPAWNED.The executable name is PASDUC.
    Please let me know how to check the code of this report and in which path can I locate the report.
    Regards,
    Mahi.

    Does this mean can I tell to my client that "This is being a spawned program, any customizations to this report needs full report development efforts"?I believe yes.
    Before I state this to my client I want to verify with this forum. Please suggest me in either case.Would your client trust my reply on here :) ?
    I would suggest you log a SR and confirm this with Oracle support, that would be a better proof.
    Thanks,
    Hussein

  • How to check postal code contains only 0 to 9

    Hi all,
    How to check postal code contains only 0 to 9
    thank you

    Hi
    Check the below link.It may help you out.
    http://help.sap.com/saphelp_47x200/helpdata/en/d3/2e974d35c511d1829f0000e829fbfe/frameset.htm
    Cheers,
    Hakim
    mark all useful answers

  • How to check from which table data is picking by datasource 0CDCY_ACT_ATTR

    Hi Experts,
    Could you please help me in finding out of the table from which datasource 0CDCY_ACT_ATTR is extracting.
    As per my knowledge is should be extract from tables(infotypes) HRP5135 - 5141.If i am wrong please correct me.
    Issue : My extractor(0cdcy_ACT_ATTR) is bringing wrong ACT_TYPE (Eg :5010) where as in table HRP5141 for that particular OBJID it is 9180( different).
    Please help me why my extractor is bringing ACT_TYPE 5010.
    This standard datasource and using Function Module :  RCF_BIW_GET_ACTIVITY, How can i check from which table it is picking the data
    Thanks in Advanve
    Sree

    Hi Sree,
    In RSA3 on the first screen, you have the option to start debugging by marking the debug check box, once you put all the selections, click on execute and it will go to debug mode, then keep on pressing F5. It will debug your code line by line, then you can check for all the select statements.
    Or once the debugging is started you will have the option to put break point on all the select statements in one shot, you can get in touch with your ABAP team.
    Regards,
    Durgesh.
    Edited by: Durgesh Gandewar on Jul 24, 2011 8:20 PM

  • How to check view code

    Hi all
    I have A view invoice_track
    i want to check the code of this view please guide me how i will check
    Thanks And Regards
    Vikas singhal

    vikas singhal wrote:
    Hai asif same result
    SQL> set linesize 1200
    SQL>  SELECT owner, text
    2   FROM all_views WHERE owner = 'NEERAJ'
    3    AND view_name = 'INVOICE_TRACK';
    OWNER                          TEXT
    ZENSOL1                        SELECT id as invoice_no, customer_name,
    nvl(dispatch_date,invoice_note_date) as
    SQL> Regards
    VikasUse
    SET long 100000

  • Extension Builder 1.5 - how to quit from code

    In EB 1.5 how can I quit my own extension from code?
    Thanks for your help,
    pjb

    Hi mlavie,
    I am glad to hear that you have evaluated CSExtension Builder and thinking to purchase it. There are two ways to do this.
    The one is what Davide suggested above. You need to subscribe to the Adobe Enterprise Devloper Program at this link: http://www.adobe.com/devnet/aedp.html
    The other option would be to purchase it once it becomes available on the Adobe Store. Until then, you are free to use the fully functional trial version. Check out the Trial FAQ here: http://download.macromedia.com/pub/developer/creativesuite/extension-builder/cs-extension- builder-trial-faq.pdf
    Best,
    gabriel tavridis
    Product Manager

  • How to check from Where a Program is Called in SAP ABAP?

    In SAP subroutine message_append in program LATPCFM2 has been called for purchase order as well as delivery (create, change, display).
    I want some custom code to be added in this subroutine by which I would know from where it is being called for "delivery creation".
    Or any way to know the called place.

    Hi Raju,
         I want to add one more thing to your explanation, While enhancing the standard Program, it will be used in several Places for Different purpose. Instead of Checking from Where it is Called, Check with for what conditions the Custom Code Should get executed and the Required Values are present in the attribute. It will work better if we add Some IF conditions Before Our Custom Code otherwie it may lead to Dump.
    EX: If SY-Tocde = 'VA01' or SY-Tocde = 'VA02' or SY-Tocde = 'VA03'.
              Custome Code.
          endif.

  • How to check object code

    Dear Team,
    I want to check Object Code  of T_Code:OMJJ.
    In T_code:SE93.it not showing .
    How I check Perticulater Object Code for Transastion  OMJJ
    thanks
    kallis

    In SU24 it show
    @5B\QMaintained@     S_CTS_ADMI     Administration Functions in Change and Transport System     Check     NO
    @5B\QMaintained@     S_DATASET     Authorization for file access     Check     NO
    @5B\QMaintained@     S_DEVELOP     ABAP Workbench     Check     NO
    @5B\QMaintained@     S_DOKU_AUT     SE61 Documentation Maintenance Authorization     Check     NO
    @5B\QMaintained@     S_GUI     Authorization for GUI activities     Check     NO
    @5B\QMaintained@     S_PRO_AUTH     IMG: New authorizations for projects     Check     NO
    @5B\QMaintained@     S_PROJECT     Project Management: Project authorization     Check     NO
    @5B\QMaintained@     S_TABU_DIS     Table Maintenance (via standard tools such as SM30)     Check     NO
    @5B\QMaintained@     S_TABU_RFC     Client Comparison and Copy: Data Export with RFC     Check     NO
    @5B\QMaintained@     S_TCODE     Transaction Code Check at Transaction Start     Check     NO
    @5B\QMaintained@     S_TRANSLAT     Translation environment authorization object     Check     NO
    @5B\QMaintained@     S_TRANSPRT     Transport Organizer     Check     NO
    It show So many Object  and it standed object .and at last it show NO in Proposal Colom
    Thanks
    kallis

  • How to check the code source of some function in the portal.

    hi all.
    i have some problem  in the portal.
    i use the ESS in the portal, and now some people can not check their salary.
    i want to check the code source, but i do not know it uses which program.
    can some one tell me the way to check the program.
    best regards.

    If you want to access the source code of any ESS component, you will need access to NWDI. NWDI NWDI = NetWeaver Development Infrastructure, it provide the tools and process to build new / modify existing applications built using NWDS. There are plenty of threads discussing how to set up NWDI, you may search for the same.
    However if the payslip problem is only for some users, it could also be a pdf issue, have you tried running the payslip for those select users within ECC?
    Thanks,
    GLM

  • How to Check Exit Code on WINNT

    Hi there,
    Do you know how to check the exit code of the sql*loader on WinNT? In my Java program, I start the sql*loader like this,
    Runtime.exec( "sqlldr ..." );
    Thanks,
    Louie
    null

    Hi,
    If u see the java documentation Runtime.getExec returns a Process Object which has a method getExitValue. If u need More Info Pls Refer to http://developer.java.sun.com
    Regards,
    Ganesh R

  • How to check redeem code

    how to check my redeem code

    If you are referring to the balance...
    See:  Check the balance of  a gift card here >  Account Home - Apple Store

  • Just upgraded from Safari to Maverick, but pop-up informed me that Mav does not support Microsoft word or excel.  What's up with that?

    Just upgraded from Safari to Maverick, but pop-up informed me that Microsoft Word or Excel will not run on OS X Mavericks.  What's up with that?  Should I click accept or ok?
    I assume this is the latest Mav OS...so the version would be 10.9.2?  It was suppose to be a free download from Apple.

    If you do not want to spend a lot of money on buying the latest Office you can get most or all of what you need from LibreOffice which is free. http://www.libreoffice.org/download/libreoffice-fresh/

  • In coded ui how do you correctly retrieve a browser window that contains an embedded Adobe PDF reader in browser

    I'am running across this issue when I'm debugging or running my coded UI automation project, where i get the exception labeled "{"COM object that has been separated from its underlying RCW cannot be used." System.Exception {System.Runtime.InteropServices.InvalidComObjectException}"
    everytime i come from a browser window that contains a pdf reader embedded in it. This happens every time I retrieve the window and try to click back. It barfs when i perform the back method on it. I've tried different things but none has worked including
    the playback wait.
    var hereIsmypdf = ReturnPDFDoc();
    public BrowserWindow ReturnPDFDoc()
    Playback.Wait(1000);
    var myPdFdoc = GlobalVariables.Browser;
    return myPdFdoc;
    hereIsmypdf.Back();
    skinny_Will

    Hi skinny_Will,
    <<"{"COM object that has been separated from its underlying RCW cannot be used." System.Exception {System.Runtime.InteropServices.InvalidComObjectException
    According this exception error message, I did some research about it. I know that this exception error is occurred in
    COM object which was disposed if you are using the COM objects in a same static class or variables which ware shared between tests.
    So please you refer the following blog to use ExecutionThread element to instruct the test to use the MTA threading model. This way, the static instance of "store" can be shared across tests.
    http://blogs.msdn.com/b/martijnh/archive/2009/12/31/unit-testing-com-object-that-has-been-separated-from-its-underlying-rcw-cannot-be-used.aspx
    Note: if you are using the VS2013 to create the coded UI test, you will need to add a test setting file to add this
    ExecutionThread.
    https://msdn.microsoft.com/en-us/library/ee256991.aspx?f=255&MSPPError=-2147217396
    In addition, ad you said that when you playback the browser window that contains an embedded Adobe PDF reader and then it could not work.
    I suggest you could try to add more searchproperties to find this target control and then check this issue.
    I find a similar thread about your issue, please refer the Steve's code to check your issue.
    https://social.msdn.microsoft.com/Forums/vstudio/en-US/73445915-ac08-47de-8bab-b6b07294d0c2/coded-ui-test-wont-find-an-pdf-browser-window-it-times-out?forum=vsunittest
    Best Regards,
    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.

  • I just did an "erase and install" on my computer, and when i drug everything back to my computer from the external hard drive. however, now i cant open microsoft word. i have an exam on tuesday that I need it for and i dont want to pay for it, HELP!

    i cant seem to get it to open. it just says "microsoft word cannot open because of a problem"
    ive tried dragging it from the harddrive to my applications folder, but its not working.
    any suggestions?

    If you purchased your version of Office online, you can redownload it from Microsoft using your product key (I don't know why the link says "office2010"... but the link is for Office for Mac 2011):
    https://www2.downloadoffice2010.microsoft.com/macdl/registerkey.aspx?ref=macdl&c ulture=en-US
    They used to have a free 30 trial, but I don't seem to see that anywhere.

  • How Come when i click on a desktop icon it go's into microsoft word?

     There are diffent icon either on my desktop or toolbar.For example on my yahoo messenger,new email icon would pop on my toolbar. I click it, then it opens into microsoft word, I have had this happen to a ebay desktop icon and it trys to load it on micosoft word too,,
      Please help
       Broken link,,I think,,, maybe

    Hello mdmorgan37,
    Sounds like something went wrong with file association.
    See if the solution mentioned in this thread helps.
    http://goo.gl/9cGvf
    1. Click on the Windows logo "Start" button on the bottom left corner of your screen
    2. Type in "regedit"
    3. Click on "regedit" search result
    4. Click on "Yes" to make changes
    5. Navigate to:
    HKEY_CURRENT_USER\
    Software\
    Microsoft\
    Windows\
    CurrentVersion\
    Explorer\
    FileExts\.
    lnk
    6. Delete the other keys except "OpenWithProgids"
    7. Log off and log back on
    Before making any modifications to your registry I would ensure you do a backup of the registry first in case something goes wrong you can restore it back to it's original state.
    If I have helped you in any way click the Kudos button to say Thanks.
    The community works together, click Accept as Solution on the post that solves your issue for other members of the community to benefit from the solution.
    - Friendship is magical.

Maybe you are looking for

  • Integration of a web application running on tomcat

    Hi all experts, I want to integrate a web application running Apache Tomcat/5.5.20. it's login page(jsp  page) have two input box uid and pwd.Login Application calls a servlet in Apache Tomcat/5.5.20 web.xml. For Accessing the loging page url is http

  • How much sales does Apple lose by not allowing upgrade of hardware?

    I wonder if Apple has ever conducted market research to find out how much sales they lose because of the inability to upgrade components with a mac? I suspect they haven't done so because they don't wish to find out the answer! I imagine they have si

  • Podcast not downloading

    Hi, I subscribe to an audio podcast and previously have had no problems having it automatically update to my Itunes and then sync to my Ipod touch. Since last August, I can no longer get any of the new podcasts to update into my Ipod. They download t

  • SQL query for JDBC adapter

    Hello Everyone, I am using a simple SELECT to fetch data from sql DB. The only SELECT it seems to fetch data is when it is getting data from sys tables. It does not work for fetching data from application tables created in the sql DB. Could this be a

  • [BUG] Removed source photos: cannot "Cancel all"

    It's more a missing feature than a bug, however I just reopened iPhoto after months, just to try out the new version (I'm a Lightroom user). Long time ago I exported an album to take a look of the software and explore its features. After months those