简体   繁体   English

升级Word 2010 vsto插件

[英]Upgrade word 2010 vsto addin

I have a old vsto addin project targetting office word 2010 and i used visual studio 2010 previously to work on this project . 我有一个针对Office Word 2010的旧vsto外接程序项目,而我以前曾使用Visual Studio 2010从事此项目。

Now some new maintenance requirements come and i have to work on it. 现在一些新的维护要求来了,我必须继续努力。 But only visual studio 2015 is there in my machine and word is upgraded to office 365. Is there any way to upgrade the existing project and edit them in visual studio 2015 但是我的机器上只有Visual Studio 2015,并且word已升级到Office365。有什么方法可以升级现有项目并在Visual Studio 2015中对其进行编辑

I can see new available project template for word addin in visual studio is now based on html , css javascript. 我可以看到Visual Studio中用于单词加载项的新可用项目模板现在基于html,css javascript。 So any possibility of migrating existing source code in c# to the new project template 因此,将C#中的现有源代码迁移到新项目模板的任何可能性

It is certainly possible to work on the existing (2010) VSTO add-in in the new version of Visual Studio - just open it. 当然,可以在新版本的Visual Studio中使用现有的(2010)VSTO加载项-只需打开它即可。 If a migration to a newer VSTO code-base is necessary VS will notify you. 如果有必要迁移到更新的VSTO代码库,VS会通知您。

But you have to be very careful if the VSTO solution still needs to run on an earlier version of Word/Office. 但是,如果VSTO解决方案仍需要在早期版本的Word / Office上运行,则必须非常小心。 If that's the case, you'll need to make sure that all references to the Microsoft Office code libraries ( Microsoft.Office.Interop.Core , etc.) have the property Embed interop types set to true. 如果是这种情况,则需要确保对Microsoft Office代码库的所有引用( Microsoft.Office.Interop.Core等)都将Embed interop types的属性设置为true。

But the new type of add-in that uses the Office JS APIs is something totally different - there's no way to migrate/convert code that uses the classic object model APIs to the new APIs. 但是,使用Office JS API的新型加载项完全不同-无法将使用经典对象模型API的代码迁移/转换为新API。 But, depending on what your VSTO add-in does, it's possible you don't even want to consider it (yet). 但是,根据VSTO加载项的功能,您甚至可能甚至不想考虑它。 The Word JS APIs are incomplete when compared to the APIs available in VSTO (and VBA) - they don't cover the entire Word functionality. 与VSTO(和VBA)中可用的API相比,Word JS API是不完整的-它们不能涵盖整个Word功能。 Migration to the new technology needs to be thoroughly researched and tested before going into production. 投入生产之前,需要对新技术的移植进行彻底的研究和测试。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM