简体   繁体   English

在Visual Studio 2005 Professional,Win XP中使用VSTO 2005 SE和C#的Office 2003加载项

[英]Office 2003 Add In using VSTO 2005 SE and C# in Visual Studio 2005 Profesional, Win XP

I have developed an Add In for Word 2003 in C# using VSTO 2005 SE. 我已使用VSTO 2005 SE在C#中为Word 2003开发了一个Add In。 The Add In creates a button near the Help button called International Projects. 加载项在“帮助”按钮附近创建一个名为“国际项目”的按钮。 When the Add In is loaded, it gets some data from a Sharepoint 2007 Library and based on that data, when a button in the International Projects menu is clicked, it generates some custom properties for the running document. 加载外接程序后,它将从Sharepoint 2007库中获取一些数据,并基于该数据,单击“国际项目”菜单中的按钮时,它将为正在运行的文档生成一些自定义属性。 On the machine that I developed the Add In it work perfectly. 在我开发的Add In机器上,它运行完美。 I tried to create a Setup Project in my solution so that I could install the Add In on other machines. 我试图在解决方案中创建一个安装项目,以便可以在其他计算机上安装该加载项。 I created the Setup using the instructions from here: http://msdn.microsoft.com/en-us/library/cc136646(v=office.12).aspx , http://blogs.msdn.com/b/vsto/archive/2008/12/17/deploying-office-2003-solutions-with-windows-installer-mary-lee.aspx and many other sites like these. 我使用此处的说明创建了安装程序: http : //msdn.microsoft.com/zh-cn/library/cc136646 ( v=office.12) .aspxhttp : //blogs.msdn.com/b/vsto /archive/2008/12/17/deploying-office-2003-solutions-with-windows-installer-mary-lee.aspx和其他类似的网站。 The problem that I am having is that when I run the setup on a user machine, the setup runs fine, there are no erros in the logs or event viewer, the registry looks to be fine, the files are copied at the address specified in the installer, the add in appears in Add/Remove programs but it doesn't load when starting Word and is not present in Word as a COM Add In. 我遇到的问题是,当我在用户计算机上运行安装程序时,安装程​​序运行良好,日志或事件查看器中没有错误,注册表看起来很好,文件被复制到指定的地址在安装程序中,该加载项会出现在“添加/删除程序”中,但在启动Word时不会加载,并且在Word中不作为COM加载项出现。 The SetSecurity project I took it from the VSTO 2005 SE Runtime Sample V3, add it to my solution and insert the output in my setup project. 我从VSTO 2005 SE Runtime Sample V3中获取了SetSecurity项目,将其添加到我的解决方案中,并将输出插入到我的安装项目中。 I still believe that it is a trust issue between Office and my add in. The PIA for office is present in assembley and the VSTO seams to be installed corectly. 我仍然认为这是Office和我的插件之间的信任问题。Office的PIA处于组装状态,而VSTO接缝必须牢固安装。 I also created another project that simply shows a MessageBox on startup and shutdown and that installs and works fine on the user machine. 我还创建了另一个项目,该项目仅在启动和关闭时显示一个MessageBox,并且可以在用户计算机上安装并正常工作。 Some strange things I noticed are the fact that when I build my project there is no .vsto file created but there is a .vsto.manifest file, I read on a forum that vsto runtime might try to use .net 1.1 instead of 2.0 when both are installed, but i installed a patch to solve that and one more that visual studio 2005 might have some problems and I found and installed a patch for that also, but none of this solved my problems. 我注意到一些奇怪的事实,即在构建项目时没有创建.vsto文件,但是有.vsto.manifest文件,我在论坛上读到vsto运行时可能会尝试使用.net 1.1而不是2.0。两者都已安装,但是我安装了一个补丁程序来解决该问题,而Visual Studio 2005可能还存在一些问题,我也为此找到并安装了补丁程序,但是这些都没有解决我的问题。 I have been working and trying all sorts of solutions for the past two weeks but without any result. 在过去的两个星期中,我一直在尝试各种解决方案,但没有任何结果。 Have you got any experience with creating setup for office 2003 Add ins? 您有创建Office 2003外接程序安装程序的经验吗? If someone does, please help me! 如果有人这样做,请帮助我! Thank you! 谢谢!

I don't envy you - I haven't had to deploy a 2003 add-in in a while, and I can't say I miss these days. 我不羡慕您-不必在一段时间内部署2003外接程序,而且我不能说我错过了这几天。

It's not an answer per se, but I noticed that the MSDN link you provide refers to Office 2007; 这本身并不是一个答案,但我注意到您提供的MSDN链接是指Office 2007。 this post, which is specific to Office 2003, may be useful: 这篇特定于Office 2003的帖子可能会有用:

http://msdn.microsoft.com/en-us/library/aa537179(office.11).aspx http://msdn.microsoft.com/zh-CN/library/aa537179(office.11​​).aspx

I remember running into some issues with Excel 2003 add-ins, maybe you'll also find ideas in some of my older posts like this one: http://clear-lines.com/blog/post/VSTO-add-in-with-multiple-assemblies.aspx 我记得Excel 2003加载项遇到了一些问题,也许您还会在我的一些较早的帖子中找到想法,例如: http : //clear-lines.com/blog/post/VSTO-add-in-与多个程序集.aspx

Good luck! 祝好运!

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

相关问题 如何使用VSTO 2005 SE使用C#Excel加载项创建Excel 2003 UDF - How to create Excel 2003 UDF with a C# Excel add-in using VSTO 2005 SE VSTO:带有Office 2010 64的Visual Studio 2005 - VSTO: Visual Studio 2005 with Office 2010 64 C# - 如何以编程方式添加Excel工作表 - Office XP / 2003 - C# - How to add an Excel Worksheet programmatically - Office XP / 2003 在运行时添加Excel功能区控件(VSTO 2005SE) - Add Excel ribbon controls at runtime (VSTO 2005SE) 使用部分类和Designer文件将Visual Studio 2003表单转换为Visual Studio 2005/2008表单 - Convert Visual Studio 2003 forms to Visual Studio 2005/2008 forms using partial classes and Designer files 在Vista上使用Visual Studio 2005 C#编写的代码无法在使用Visual Studio 2010 C#的新Windows 7 PC上运行 - Code written using visual studio 2005 C# on vista does not run on new Windows 7 PC using visual studio 2010 C# C#和Visual Studio 2005中的程序集之间的循环引用(再次…) - Circular reference between Assemblies in C# and Visual Studio 2005 (Again…) Visual Studio 2005 中的 Crystal Reports(C# .NET Windows 应用程序) - Crystal Reports in Visual Studio 2005 (C# .NET Windows App) Visual Studio 2005中不存在C#项目类型 - C# Project Type not present in Visual Studio 2005 存储过程(Visual Studio ASP.Net 2005 C#) - stored procedure (Visual Studio ASP.Net 2005 C#)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM