简体   繁体   English

使用 Microsoft.Office.Interop.Word 程序集

[英]Using Microsoft.Office.Interop.Word assembly

I have to do a word document programming in c#.我要在c#做word文档编程。 Is there any way to access Microsoft.Office.Interop.Word assembly without installing Microsoft word?有没有办法在不安装 Microsoft Word 的情况下访问 Microsoft.Office.Interop.Word 程序集? I tried to install Office Primary Interop Assemblies But it ask me install Microsoft Office package first.我尝试安装 Office Primary Interop Assemblies 但它要求我先安装 Microsoft Office package。

Have you tried the PIA Redistributable for whatever version of Office you are trying to work on?您是否尝试过 PIA Redistributable 用于您尝试使用的任何版本的 Office?

The Office 2010 PIA redistributable, for example, does not list Office as a requirement (but of course that could be an error in the System Requirements section).例如,Office 2010 PIA 可再发行组件并未将 Office 列为要求(当然,这可能是系统要求部分中的错误)。

http://www.microsoft.com/downloads/en/details.aspx?FamilyID=938fe8ad-583b-4bd7-a345-23250dc15855#SystemRequirements http://www.microsoft.com/downloads/en/details.aspx?FamilyID=938fe8ad-583b-4bd7-a345-23250dc15855#SystemRequirements

maybe its too late to answer... but for those who are looking for the same solution, Open XML SDK is the library Microsoft released and its used to work with office documents (doc, xls, ppt,...)也许回答太晚了......但对于那些正在寻找相同解决方案的人来说, Open XML SDK是微软发布的库,它用于处理办公文档(doc、xls、ppt......)

As Dr TJ says, you could use Open XML SDK for it.正如 TJ 博士所说,您可以使用Open XML SDK We used Word.Interop but it halt sometimes, and it is not recommend for Microsoft, to use it as a server side document formatting, so Open XML SDK lets you creates word documents on DOCX and Open XML formats very easily.我们使用了 Word.Interop,但它有时会停止,并且不建议 Microsoft 将其用作服务器端文档格式,因此 Open XML SDK 让您可以非常轻松地在 DOCX 上创建 word 文档和 Open Z3501BB093D363810B6Z8CFEDF8 格式。 It lets you going well with scability, confidence ( the files, if it is corrupted can be rebuild ), and another very fine characteristics.它让您在可扩展性、信心(文件,如果损坏可以重建)和另一个非常好的特性方面进展顺利。

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

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