开发者

How to reuse visual studio for office ribbons and code across different ofiice document types

开发者 https://www.devze.com 2023-03-19 04:55 出处:网络
I am new to Vi开发者_Go百科sual studio for office (VSTO) I am using VSTO to create an addon for PowerPoint, Word and Excel. The ribbons (UI) look-and-feel will be the same for the addons. Here is my

I am new to Vi开发者_Go百科sual studio for office (VSTO)

I am using VSTO to create an addon for PowerPoint, Word and Excel. The ribbons (UI) look-and-feel will be the same for the addons. Here is my question:

How can I set up the visual studio such that I use only one code base for these addons and reuse Ribbon UI; or must I creates separates solutions each for PowerPoint, Word and Excel?


Out of the box it is pretty hard to achieve what you are after.

If you use the VSTO Contrib project's Ribbon Factory you can reuse the ribbon viewmodel's between all of the add-ins pretty easily I think.

http://vstocontrib.codeplex.com/

In addition, I would then manually go and edit your .csproj file of the shared project to conditionally include specific references so you do not have all the office interop libraries referenced at once.

0

精彩评论

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