简体   繁体   English

如何在不使用Visual Studio的情况下开发Microsoft Office AddIn

[英]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并按照以下步骤操作:

  1. Install the Interop Assemblies 安装互操作程序集
  2. Create a Visual Studio .Net Project ( I'm unable to do this bit ) 创建一个Visual Studio .Net项目( 我无法做到这一点
  3. Extend the VS ThisAddIn template 扩展VS ThisAddIn模板

What I've managed to do is to: 我设法做的是:

  1. Install the Interop Assemblies 安装互操作程序集
  2. Create a C# empty SharpDevelop project 创建一个C#空的SharpDevelop项目
  3. Add a GAC reference to Microsoft.Office.Interop.Outlook 向Microsoft.Office.Interop.Outlook添加GAC引用
  4. Add a COM reference to Microsoft Office 12.0 Object Library 将COM引用添加到Microsoft Office 12.0对象库
  5. add the line using Outlook = Microsoft.Office.Interop.Outlook; using Outlook = Microsoft.Office.Interop.Outlook;添加该行using Outlook = Microsoft.Office.Interop.Outlook;
  6. and the line using Office = Microsoft.Office.Core; using Office = Microsoft.Office.Core;的行using Office = Microsoft.Office.Core;
  7. Look at some example code and realise that they all refer to VS templates and VSTO libraries (Microsoft.Office.Tools) which I don't have. 看一些示例代码,并意识到它们都是指我没有的VS模板和VSTO库(Microsoft.Office.Tools)。

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.comhttps://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.

相关问题 如何在vs2010中为64位版本的办公室开发Microsoft office word addin - How to develop Microsoft office word addin for 64bit version office in vs2010 是否可以通过Visual Studio(2017)打包(发布,构建)未签名的Microsoft Office插件(VSTO)? - Is there way to package (publish, build) unsigned Microsoft Office Addin (VSTO) from Visual Studio (2017)? 如何在没有外接程序基础结构的情况下使用Visual Studio FileCodeModel? - How to use Visual Studio FileCodeModel without the Addin infrastructure? 如何访问Visual Studio DTE外接程序程序集 - How to access a Visual Studio DTE Addin assembly 如何在Visual Studio插件中阻止OpenFile - How to block on a OpenFile in a Visual Studio addin 如何为MS Outlook开发插件? - How to develop addin for MS Outlook? 找不到Microsoft.Office.Interop Visual Studio - Cannot find Microsoft.Office.Interop Visual Studio 查找在Visual Studio运行时在系统上安装的Microsoft Office版本 - Finding version of Microsoft Office installed on system at runtime in Visual Studio 如何通过无缝身份验证从 microsoft word 2013 插件在 office 365 sharepoint 2013 站点中保存文档? - How to save document in office 365 sharepoint 2013 site from microsoft word 2013 addin with seamless authentication? “ Microsoft Office开发人员工具”和“用于Office的Visual Studio工具”之间有什么区别 - What is the difference between “Microsoft Office Developer Tools” and “Visual Studio Tools for Office”
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM