开发者

Excel 2007 VSTO Add-in Not visible even after successful install

开发者 https://www.devze.com 2023-03-08 23:04 出处:网络
I am bit confused with the excel 2007 addin behaviour. Any ideas is highly appreciated. Here is what I am doing in chronological order.

I am bit confused with the excel 2007 addin behaviour. Any ideas is highly appreciated. Here is what I am doing in chronological order.

  1. I have a excel 2007 VSTO addin and it build and debugs file so I Publish it to a folder
  2. I go to the folder and run the Setup which installs the addin . Next time when I open excel the addin is visiable. So far perfect !!
  3. Then I go to Excel Office button -->Excel Options -->Addins --> Manage --> COM Addins and remove the addin that I just installed. This makes the addin go away from my excel ribbon. So far as expected !!

But at this point my addin is instal开发者_运维知识库led and is only removed from the list of active addins. Correct ? If it is correct how do I re-add it , because I cannot see it in list of inactive addins. The only way I get it back is to remove it from Add/Remove Programs and reinstall and restart excel.

Is this is only way or I can re-add the addin somehow since it is already installed.


As far as I know, that's a problem with VSTO. With normal COM addins, you can open the Com Addin window, click the ADD button and select your addin's dll.

But with VSTO, that doesn't work, since VSTO dll's are not quite "normal" COM dlls. For VSTO, you have to point Excel at the .VSTO file, but you can't do that from within Excel itself, only an installer can make that happen.


Loading of addins are controlled through registry keys

VSTO addins are different in the sense that they don't load directly as a dll but through some sort of loader. The loader is the same for all vsto addins and knows what assembly to load through a manifest (the .vsto file)

Getting the add-in back in the list without reinstalling requires you to restore the registry entry for it
If you export the registry hyve for your addin to a .reg file you can reenable it later by simply double clicking the reg file. The required keys can be found here: http://msdn.microsoft.com/en-us/library/ff937654.aspx) (Search for manifest)


I think the answer above is too complicated:


  1. Answer:

    • You can re-enable your Add-In by deinstalling it in Windows
    • After that, double-click the vsto file to re-install it (note that if you have a "real" setup includinf a bootstrapper, you have to install by executing "setup.exe")

  1. Answer: I think that was what you wanted to do:

    • If you just want to deactivate your Add-In in in Excel, do not "Remove" in the "COM Add-Ins" dialog.
    • Just uncheck your Add-In in the list and it will be deactivated.
    • You can then re-activate it by checking it in the list again.

Regards, Jörg

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号