locked
Issue Deploying a Word COM Add-in to a Corporate Environment RRS feed

  • Question

  • Our company is developing a Word COM add-in using VSTO. We have followed the deployment guidance found at this link:

    http://msdn.microsoft.com/en-us/library/cc563937(office.12).aspx

    The project uses a ClickOnce installer and installs/runs perfectly under both Admin and Standard User accounts on standalone machines that are not managed by an IT team (home users, small business users, etc.)  However, on managed machines in a corporate environment, the installation goes fine but at runtime Word starts up, does not finish loading the add-in, and displays a WINWORD error that reads: “ Could not initialize application. Error 42. Please try choosing “Run as Administrator”. We are seeing this issue at multiple corporate customer sites.  Are there any known causes/solutions for this? Is this related to Group Policies IT may be setting?

    Guidance or suggestions are greatly appreciated.


    Wednesday, July 17, 2013 7:45 PM

Answers

  • Hi,

    Which version of Microsoft Visual Studio Tools do you use?

    Do you confirm the following things:

    Conclusion

    An add-in or customization for Visual Studio Tools for the Office system needs permission to run. If you build Microsoft Office 2003 solutions with any version of Visual Studio Tools for the Office system or if you build 2007 Office system solutions by using Microsoft Visual Studio 2005 Tools for the 2007 Microsoft Office system (Second Edition), you have to grant full trust permission to the assembly.

    By default, these solutions do not have permission to execute. This is a source of confusion and difficulty for developers working with Visual Studio Tools for the Office system. There are documented ways to make this easier. However, they require extra steps and not everyone is fully aware of them.

    As you see in this article, Visual Studio 2008 Professional enables you to use ClickOnce to deploy solutions for the 2007 Office system. ClickOnce, by default, gives Microsoft Office solutions full trust permissions. The extra step that has caused issues in the past is now built-in. This is a welcome enhancement to the product.

    ClickOnce is easy to use, but it also provides several layers of control. You can determine which of the techniques you have seen here to use for your solutions and customers.

    http://msdn.microsoft.com/en-us/library/bb821233(v=office.12).aspx

    Best regards,


    Rex Zhang
    TechNet Community Support

    • Marked as answer by Rex Zhang Sunday, July 28, 2013 4:48 AM
    Wednesday, July 24, 2013 7:43 AM