microsoft.office.interop.word dll(2007/2010)issue / c#.net [英] microsoft.office.interop.word dll (2007/2010)issues/ c#.net

查看:92
本文介绍了microsoft.office.interop.word dll(2007/2010)issue / c#.net的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题:生成服务器中没有发生word文档的填充值。对象参考错误。



开发服务器(工作正常)



i我试图使用c#.am使用microsoft.office.interop.word dll(版本12.0相关)填充word文档的值单词2007)作为我项目的参考。在我的开发服务器Office 2007中安装。能够填充值并正确保存文档而不会出现任何错误。



生产环境



获取对象引用错误。我在这个服务器上看到的一个区别是安装了Microsoft Word 2010。我尝试了我的水平,但没有运气。



*这是因为2010生产服务器中安装了word 2010?



*当我在安装了word 2007的其他生产服务器上托管应用程序时。应用程序工作正常。



请建议我某种方式以便我可以继续前进。



谢谢



开发。

issue: populating values for word document is not happening.object reference error in production server.

development server( working fine)

i am trying to populate the values for the word document using c#.am using microsoft.office.interop.word dll (version 12.0 related to word 2007) as a reference in my project. in my development server office 2007 is installed. am able to populate the values and save the document properly without any error.

Production Environment

getting object reference error. the one difference i see in this server is microsoft word 2010 is installed. i tried my level best but no luck.

*is this because word 2010 is installed in the production server?

*when i hosted the application in the other production server where word 2007 is installed.the application is working fine.

please suggest me some way so that i can go forward.

Thanks

Dev.

推荐答案

您不必安装Office。在某些情况下,这很糟糕甚至是不可接受的。请参阅此Microsoft文章: http://support.microsoft.com/default。 aspx?scid = kb; EN-US; q257757 #kb2 [ ^ ]。



或者,您可以使用Open XML SDK:



http://www.microsoft.com/en -us / download / details.aspx?id = 30425 [ ^ ]。



这样,您就可以支持新的基于XML的Office格式(例如.DOCX ,. XLSX),ECMA-376标准:

http://en.wikipedia.org/wiki/Microsoft_Office_XML_formats [ ^ ],

http://en.wikipedia.org/wiki / Office_Open_XML [ ^ ]。



这是另一种选择: http://npoi.codeplex.com/ [ ^ ]。



< dd> -SA
You don't have to have Office installed. In some settings, this is bad or even unacceptable. Please see this Microsoft article: http://support.microsoft.com/default.aspx?scid=kb;EN-US;q257757#kb2[^].

Alternatively, you can use Open XML SDK:

http://www.microsoft.com/en-us/download/details.aspx?id=30425[^].

This way, you can support new XML-based Office formats (such as .DOCX, .XLSX), ECMA-376 standard:
http://en.wikipedia.org/wiki/Microsoft_Office_XML_formats[^],
http://en.wikipedia.org/wiki/Office_Open_XML[^].

This is another option: http://npoi.codeplex.com/[^].

—SA


您好我已经使用open xml方法解决了这个问题。



谢谢

Dev
hi i have resolved this issues by using open xml method.

Thanks
Dev


这篇关于microsoft.office.interop.word dll(2007/2010)issue / c#.net的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆