none
Why VSTO add-in might not work if the application is started programmatically? RRS feed

  • Question

  • Hi,

    I notice that Document-level customizations or Application-level add-ins that created by using the Office developer tools in Visual Studio are designed to be used only when the application is started by an end user. If the application is started programmatically, they might not work as expected. What accounts for?

    Thanks

    Monday, April 11, 2016 6:50 AM
    Moderator

Answers

  • Hello Celeste,

    COM add-ins should work correctly when the host is automated from another external application. Looks like add-ins were not designed and developed correctly. What add-ins are you talking about?

    Anyway, Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment.

    If you are building a solution that runs in a server-side context, you should try to use components that have been made safe for unattended execution. Or, you should try to find alternatives that allow at least part of the code to run client-side. If you use an Office application from a server-side solution, the application will lack many of the necessary capabilities to run successfully. Additionally, you will be taking risks with the stability of your overall solution. Read more about that in the Considerations for server-side Automation of Office article.


    [custom.development]

    Monday, April 11, 2016 10:10 AM