none
Use Word 2007 Addin in Word 2010

    Question

  • Hi everyone,

    I have developed a Word 2007 Addin and created a setup to deploy it. It installs without problems in Word 2007. Now I have the requirement to also support Word 2010. I was hoping to be able to use the same setup for Word 2010 too. But this isn't the case. I am getting an error message while installing. The message is "Eine Komponente, die mit word 2007 interagiert, ist nicht vorhanden. Bitte führen sie die Setup.exe aus!". Sorry for the german message. Its because the german OS. It says that "a component, which interacts with word 2007, is not available. Please run setup.exe". But I am running setup.exe (not the msi). :D

    So I want to know, if I can use a Word2007 addin in word 2010? I am using Visual studio 2010, but targeting the .net framework 3.5. Are there any requirements (.net Framework 4, Office 2010 PIA's, etc) to be able to develop and publish word 2010 addins? I read that the 2010 PIA's are not ready yet. Is this a problem?

     

    Thanks for help,

    regards...


    F/\nt/\sy PRODUCTIONS
    Wednesday, June 09, 2010 4:18 PM

Answers

  • From the error message you’re getting, it sounds like you followed the instructions here to create the setup file for your Word 2007 add-in. My understanding is that the setup file that you create from these instructions only checks for the presence of Office 2007 (this article was written long before Office 2010 was available), and returns the error otherwise. You are correct in that the Office 2010 PIA redistributable (and corresponding bootstrapper component for deployment) is not available yet. The latest I have heard is that it should be available sometime later this month, and a new deployment article with proper guidance for creating an MSI/setup file for deploying add-ins to Office 2010 along with the Office 2010 PIA redistributable should be available sometime after. Until the redistributable is released, the only way to install the Office 2010 PIAs is to make sure the “.NET Programmability Support” feature for each Office application is selected when installing Office 2010. Note that these features are selected by default when Office 2010 is installed.

    In the meantime, I believe you have the following options for deploying your existing Word 2007 add-in to computers running Word 2010.

    1) Modify your setup project to also check for the presence of the Office 2010 PIAs referenced by your add-in.

    In addition to checking for the Office 2007 PIAs, you can also check for the Office 2010 PIAs. The component IDs for these PIAs are provided by Aaron Cathcart in this thread: http://social.msdn.microsoft.com/Forums/en-US/vsto/thread/9bde5b41-f5da-4918-b62b-8ab24479ef93. If the check for the Office 2010 PIAs succeeds, then your setup file can continue installing the add-in; otherwise, it can fail with some suitable message such as “The Office 2010 primary interop assemblies are not installed. To install this required component, rerun Office 2010 setup and install the “.NET Framework Programmability Support” feature for Word 2010. Then, run setup.exe again to install the add-in”. If you must provide a full installer that also deploys the Office 2010 PIAs, then you'll need to wait until the Office 2010 PIA redistributable is released. If you want to specialize the setup project for Office 2010 installations only, you can also modify the setup project to no longer install the VSTO 3.0 runtime. Office 2010 automatically includes the Visual Studio 2010 Tools for Office runtime components for running add-ins that target the .NET Framework 3.5, so deploying the VSTO 3.0 runtime is not necessary on computers that have Office 2010 installed. In fact, even if the VSTO 3.0 runtime is installed, Office 2010 will still use the Visual Studio 2010 Tools for Office runtime to run the add-in.

    2) Use ClickOnce to generate a setup.exe file your customers can use to install your Word 2007 add-in on computers with Word 2010.

    Before you do this, you should uncheck the Office 2007 PIAs in the Prerequisites dialog box (in the Publish tab of the project properties). This version of the PIAs won’t install with Office 2010, and even if they could install they aren’t necessary because the Office 2010 PIAs include the binding redirect assemblies for the Office 2007 PIAs (see the bottom of http://msdn.microsoft.com/en-us/library/15s06t57.aspx for information about binding redirect assemblies). If you’re publishing the add-in from Visual Studio 2008, you should also uncheck the Visual Studio Tools for Office 3.0 runtime in the Prerequisites dialog box. Office 2010 automatically includes the Visual Studio 2010 Tools for Office runtime components for running add-ins that target the .NET Framework 3.5 (the same components can run Office 2007 add-ins created by using Visual Studio 2008, targeting the VSTO runtime 3.0). For more information, see http://blogs.msdn.com/b/vsto/archive/2010/05/13/when-do-i-need-to-deploy-the-vsto-runtime.aspx and http://msdn.microsoft.com/en-us/library/ee712596.aspx.


    This posting is provided "AS IS" with no warranties, and confers no rights.
    • Marked as answer by Bessie Zhao Tuesday, June 15, 2010 2:59 AM
    Wednesday, June 09, 2010 7:33 PM
    Answerer
  • For your second question, yes, I believe that deploying the VSTO 3.0 runtime is most likely the cause of your problem. If you're using Visual Studio 2010, then you should be deploying the Visual Studio 2010 Tools for Office runtime.

    Regarding your first question, I would think it should be possible to create a single setup file that succeeds if either Word 2007 or Word 2010 is installed (checks for both the Word 2007 and Word 2010 PIAs), but I don't have enough experience here to say for certain whether this is the case. I'll follow up with some folks on the product team and get back to you as soon as I can.


    This posting is provided "AS IS" with no warranties, and confers no rights.
    • Marked as answer by Bessie Zhao Tuesday, June 15, 2010 2:59 AM
    Thursday, June 10, 2010 7:00 PM
    Answerer

All replies

  • From the error message you’re getting, it sounds like you followed the instructions here to create the setup file for your Word 2007 add-in. My understanding is that the setup file that you create from these instructions only checks for the presence of Office 2007 (this article was written long before Office 2010 was available), and returns the error otherwise. You are correct in that the Office 2010 PIA redistributable (and corresponding bootstrapper component for deployment) is not available yet. The latest I have heard is that it should be available sometime later this month, and a new deployment article with proper guidance for creating an MSI/setup file for deploying add-ins to Office 2010 along with the Office 2010 PIA redistributable should be available sometime after. Until the redistributable is released, the only way to install the Office 2010 PIAs is to make sure the “.NET Programmability Support” feature for each Office application is selected when installing Office 2010. Note that these features are selected by default when Office 2010 is installed.

    In the meantime, I believe you have the following options for deploying your existing Word 2007 add-in to computers running Word 2010.

    1) Modify your setup project to also check for the presence of the Office 2010 PIAs referenced by your add-in.

    In addition to checking for the Office 2007 PIAs, you can also check for the Office 2010 PIAs. The component IDs for these PIAs are provided by Aaron Cathcart in this thread: http://social.msdn.microsoft.com/Forums/en-US/vsto/thread/9bde5b41-f5da-4918-b62b-8ab24479ef93. If the check for the Office 2010 PIAs succeeds, then your setup file can continue installing the add-in; otherwise, it can fail with some suitable message such as “The Office 2010 primary interop assemblies are not installed. To install this required component, rerun Office 2010 setup and install the “.NET Framework Programmability Support” feature for Word 2010. Then, run setup.exe again to install the add-in”. If you must provide a full installer that also deploys the Office 2010 PIAs, then you'll need to wait until the Office 2010 PIA redistributable is released. If you want to specialize the setup project for Office 2010 installations only, you can also modify the setup project to no longer install the VSTO 3.0 runtime. Office 2010 automatically includes the Visual Studio 2010 Tools for Office runtime components for running add-ins that target the .NET Framework 3.5, so deploying the VSTO 3.0 runtime is not necessary on computers that have Office 2010 installed. In fact, even if the VSTO 3.0 runtime is installed, Office 2010 will still use the Visual Studio 2010 Tools for Office runtime to run the add-in.

    2) Use ClickOnce to generate a setup.exe file your customers can use to install your Word 2007 add-in on computers with Word 2010.

    Before you do this, you should uncheck the Office 2007 PIAs in the Prerequisites dialog box (in the Publish tab of the project properties). This version of the PIAs won’t install with Office 2010, and even if they could install they aren’t necessary because the Office 2010 PIAs include the binding redirect assemblies for the Office 2007 PIAs (see the bottom of http://msdn.microsoft.com/en-us/library/15s06t57.aspx for information about binding redirect assemblies). If you’re publishing the add-in from Visual Studio 2008, you should also uncheck the Visual Studio Tools for Office 3.0 runtime in the Prerequisites dialog box. Office 2010 automatically includes the Visual Studio 2010 Tools for Office runtime components for running add-ins that target the .NET Framework 3.5 (the same components can run Office 2007 add-ins created by using Visual Studio 2008, targeting the VSTO runtime 3.0). For more information, see http://blogs.msdn.com/b/vsto/archive/2010/05/13/when-do-i-need-to-deploy-the-vsto-runtime.aspx and http://msdn.microsoft.com/en-us/library/ee712596.aspx.


    This posting is provided "AS IS" with no warranties, and confers no rights.
    • Marked as answer by Bessie Zhao Tuesday, June 15, 2010 2:59 AM
    Wednesday, June 09, 2010 7:33 PM
    Answerer
  • Hi McLean,

    first of all, thank you for your great post. It helped me a lot to understand the changes. But I still have a few questions. Please let me write down, what I understand from your post and the given links and correct me, if I am wrong in anyway:

    - I need to use the same setup for both Word 2007 and 2010. You told me that I should check if 2010 PIA's are present. But that means I have two checks, one for 2007 and one for 2010. The setup continues only, if all requirements are met. So I can only proceed, if 2007 AND 2010 are installed. But what if I have users with only 2007, or only 2010? Can I still go on with one setup?

    - I have a Word 2007 Addin targeting the .Net Framework 3.5. I am using Visual Studio 2010. I got an InvalidManifestException when I deployed my addin including VSTO 3.0. In the following link it is told, that VS2010 needs to include VS2010 Tools for Office Runtime:

    http://social.msdn.microsoft.com/Forums/en-US/vsto/thread/42d3c7f0-c990-4c69-a0cc-a3ed91272557

    I think I have to include VS2010 Tools for Office Runtime instead of VSTO3.0, and not include it additionally to VSTO3.0, am I right?

    Are there any risks, to include both?

    Thanks for your help...


    F/\nt/\sy PRODUCTIONS
    Thursday, June 10, 2010 11:44 AM
  • For your second question, yes, I believe that deploying the VSTO 3.0 runtime is most likely the cause of your problem. If you're using Visual Studio 2010, then you should be deploying the Visual Studio 2010 Tools for Office runtime.

    Regarding your first question, I would think it should be possible to create a single setup file that succeeds if either Word 2007 or Word 2010 is installed (checks for both the Word 2007 and Word 2010 PIAs), but I don't have enough experience here to say for certain whether this is the case. I'll follow up with some folks on the product team and get back to you as soon as I can.


    This posting is provided "AS IS" with no warranties, and confers no rights.
    • Marked as answer by Bessie Zhao Tuesday, June 15, 2010 2:59 AM
    Thursday, June 10, 2010 7:00 PM
    Answerer
  • Dear koraykazgan

     

    I am also making word addin 2007 in VS 2010. It works fine on developer machine. I m using .mdb file for get data and simple paste into word as per user selection. I want to make its setup file but could not do this. can u plz help me in this regard.

     

    Thanks in advance.

    Saturday, November 06, 2010 3:19 PM