[英]How to develop a Microsoft Office AddIn without Visual Studio
I'm trying to develop an MS Office Addin in C# .Net and I don't have access to Visual Studio. 我正在尝试使用C#.Net开发MS Office Addin,但我无法访问Visual Studio。 Instead I'm using SharpDevelop as my IDE, (but my question is equally relevant to anyone developing using any other IDE or compiling from the command line...) 相反,我使用SharpDevelop作为我的IDE,(但我的问题与任何使用任何其他IDE开发或从命令行编译的人同样相关......)
I've done a bit of searching for guides on how to develop AddIns, but they all seem to require Visual Studio and follow these steps: 我已经做了一些搜索有关如何开发AddIns的指南,但它们似乎都需要Visual Studio并按照以下步骤操作:
What I've managed to do is to: 我设法做的是:
using Outlook = Microsoft.Office.Interop.Outlook;
using Outlook = Microsoft.Office.Interop.Outlook;
添加该行using Outlook = Microsoft.Office.Interop.Outlook;
using Office = Microsoft.Office.Core;
和using Office = Microsoft.Office.Core;
的行using Office = Microsoft.Office.Core;
Where do I go from here? 我从哪里开始? Is there a guide/tutorial I've missed, or can someone provide some pointers? 有没有我错过的指南/教程,或者有人可以提供一些指示?
NetOffice ( http://netoffice.codeplex.com or https://osdn.net/projects/netoffice/ ) is a great set of version-independent interop assemblies for Office. NetOffice( http://netoffice.codeplex.com或https://osdn.net/projects/netoffice/ )是一组很好的与Office版本无关的互操作程序集。 This is all you need to make add-ins using SharpDevelop, and the project has a bunch of tutorials and samples too, including some for Outlook. 这就是使用SharpDevelop制作插件所需的全部内容,该项目还包含一些教程和示例,包括一些用于Outlook的插件。
If you're making an add-in for Excel using Excel-DNA (which you need to expose user-defined worksheet functions from .NET), NetOffice still gives you a complementary set of libraries for accessing the Excel COM automation interfaces from your Excel-DNA add-in, so they work together well. 如果您使用Excel-DNA (需要从.NET公开用户定义的工作表函数)为Excel创建加载项 ,NetOffice仍然为您提供一组补充库,用于从Excel访问Excel COM自动化接口-DNA加载项,因此它们可以很好地协同工作。
For both NetOffice and Excel-DNA, you'll also be able to use the free Visual Studio Express editions (with some small tricks needed to get debugging working). 对于NetOffice和Excel-DNA,您还可以使用免费的Visual Studio Express版本(需要一些小技巧才能使调试工作)。 Visual Studio Express does not include VSTO at all. Visual Studio Express根本不包含VSTO。 SharpDevelop also has many more features than the Express editions, like built-in refactoring and VB.NET <-> C# translation tools, so there are good reasons to prefer SharpDevelop as your free IDE. SharpDevelop还有比Express版本更多的功能,如内置重构和VB.NET < - > C#转换工具,因此有充分理由选择SharpDevelop作为免费IDE。
EDIT: I missed the reference to Outlook, my apolgies. 编辑:我错过了Outlook的参考,我的apolgies。
For Outlook, look here . 对于Outlook,请看这里 。 Outlook Redemption is useful. Outlook Redemption非常有用。
I'm not a Word Expert, but there are plenty of tutorials on the web. 我不是Word专家,但网上有很多教程。
For Excel I'd suggest you actually look at ExcelDNA 对于Excel,我建议您实际查看ExcelDNA
Plenty of SO questions on this topic. 关于这个主题的很多问题。 See Exposing .net methods as Excel functions? 请参阅将.net方法公开为Excel函数? for example as additional advice on where to start and what your options are. 例如,作为关于从哪里开始以及您的选择是什么的额外建议。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.