none
Error in Word if our AddIn is installed AND DISABLED RRS feed

  • Question

  • Hi all;

    We have a DOCX from one of our customers with an XLSX embedded in it. If our AddIn is not installed, then within the DOCX you can edit the XLSX. If our AddIn is installed and disabled (LoadBehavior=2) then when clicking on the embedded XLSX inside the DOCX we get the message:

    Microsoft Word can't start the application required to open this object. An error occured and this feature is no longer functioning properly. Would you like to repair this feature now?

    and then:

    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.

    How does my AddIn have any impact if it is disabled? And how do I get it so it works with this DOCX?

    thanks - dave


    Who will win The Windward International Collegiate Programming Championships?


    • Edited by DavidThi808 Friday, February 7, 2014 3:21 PM
    Thursday, February 6, 2014 9:50 PM

Answers

All replies

  • According to your descriptioin, you developed an add-in for Word. And when you install the add-in whatever it is enabled or disabled you can’t edit the embedded Excel in Word document, did I understood correctly?

    I suggest you trying to start the Word in safe mode to see whether this issue was caused by the compatibility with other add-ins. Or you can disable all add-ins for Word to see whether the issue is fixed.

    • Edited by BruseBoBo Friday, February 7, 2014 8:17 AM
    Friday, February 7, 2014 8:16 AM
  • Hi Dave

    Can you be more specific about what you mean with:

    <<If our AddIn is not installed within the DOCX...>>

    An Add-in installs "in" an application, not a document?


    Cindy Meister, VSTO/Word MVP, my blog

    Friday, February 7, 2014 8:59 AM
    Moderator
  • Hi;

    Good idea with safe mode. I tried that and now when clicking on the embedded Excel I get:

    The server application, source file, or item cannot be found.
    Make sure the application is properly installed, and that it has not been deleted, moved, renamed, or blocked by policy.

    Could this be due to safe mode? If not, then still won't bring it up if our AddIn is installed (but not running).

    ??? - thanks - dave


    Who will win The Windward International Collegiate Programming Championships?

    Friday, February 7, 2014 3:20 PM
  • Hi;

    There's that great joke about the difference between "let's eat Grandpa" and "Let's eat, Grandpa." Ishould have had a then - just edited it to add it:

    "installed, then within"

    thanks - dave


    Who will win The Windward International Collegiate Programming Championships?

    Friday, February 7, 2014 3:22 PM
  • Hi Dave

    The error you seeis usually an indication of a problem with the OLE registration of the OLE server - in this case, Excel. I assume you've checked that Excel is installed? And there's not a rogue instance running in the Task Pane? The application isn't blocked by an open dialog box or something similar? Anti-virus that might be interfering with OLE (that was a real problem a few years ago)?

    I know, I know these things are probably OK, but over the years I've learned to never assume "the obvious"... :-)

    Was this file originally a DOCX or could it have come originally from the old binary file format? And the embedded Excel workbook, same question? Are you sure it's originally a workbook created with Excel and not some other software? (My gut feeling is that we could be dealing with a version conflict.)

    If you Alt+F9 what's the field code for the embedded Excel workbook (if any - it will depend on Office versions involved)?


    Cindy Meister, VSTO/Word MVP, my blog

    Friday, February 7, 2014 4:18 PM
    Moderator
  • Hi;

    1. We got this from a customer and they say it's all new created in Office 2013. But I can't be 100% on that.
    2. The OLE registration should all be ok because it all works great if they uninstall our AddIn.

    But... your question about Excel running - yes! I killed the zombie Excel process and then it all worked fine with our AddIn installed but disabled. So the fails if we're installed I think is just a zombie Excel process.

    Once I got that figured out (thank you), I then discovered it runs wine with our AddIn enabled for Word, but I have to disable the AddIn in Excel. So...

    1. How do I debug this? Is there a way to have it break in the debugger when it hits an exception?
    2. Is there something I can look at in the start-up of my AddIn to know Excel is being used as an OLE object and decline to load in that case? We do not need our AddIn running when Office is running as an embedded object.

    ??? - thanks - dave


    Who will win The Windward International Collegiate Programming Championships?


    • Edited by DavidThi808 Saturday, February 8, 2014 12:27 AM
    Saturday, February 8, 2014 12:21 AM
  • Hi Dave

    <<I then discovered it runs wine with our AddIn enabled for Word, but I have to disable the AddIn in Excel. So...>>

    This is a known problem, already for years. See the discussions that are listed in this search result:

    http://social.msdn.microsoft.com/Search/en-US/?query=OLE%20Whitechapel%20Cindy&rq=meta:Search.MSForums.ForumID(0e69520a-0af0-4085-a8c4-c5f21ce20e01)+site:microsoft.com&rn=Visual+Studio+Tools+for+Office+Forum


    Cindy Meister, VSTO/Word MVP, my blog

    • Marked as answer by DavidThi808 Wednesday, February 12, 2014 10:09 PM
    Saturday, February 8, 2014 4:04 PM
    Moderator
  • Hi Cindy;

    The good news is - that's the issue. The bad news is:

    1. According to the various threads, UserControl is not always going to provide this correctly in Excel.
    2. I tested UserControl in Word and it returns false when starting Word normally so it's not a solution for Word.
    3. PowerPoint doesn't have UserControl.

    Is there any better solution or is the best one can do is use UserControl in Excel and tell users that at times they just can't edit embedded spreadsheets.

    ??? - thanks - dave


    Who will win The Windward International Collegiate Programming Championships?

    Tuesday, February 11, 2014 1:09 AM
  • Hi Dave

    About the only thing I know of (and it's not something I've ever tried, really) would be to have ONE add-in that loads automatically. This add-in would be responsible for managing all other add-ins. It would check the "state" (for example in the old OLE world the name of the document, which is different if it's an embedded object) and only load the "real" add-in(s) if particular criteria are met (not an embedded object, for example).


    Cindy Meister, VSTO/Word MVP, my blog

    Wednesday, February 12, 2014 6:59 PM
    Moderator
  • Ow, that strikes me as something that might cause more problems than it solves.

    Ok, we'll go with the UserControl for Excel and just warn users about all this.

    thanks - dave


    Who will win The Windward International Collegiate Programming Championships?

    Wednesday, February 12, 2014 10:09 PM