在Windows Form C#上打开Word(.docx)文件 [英] Opening Word (.docx) files on a Windows Form C#

查看:50
本文介绍了在Windows Form C#上打开Word(.docx)文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使我的程序能够在窗体上显示Microsoft Word文件,但这样做没有任何运气.我希望能够打开该文件并将其显示为只读形式.所以基本上只显示它的内容.Web上的各种用户都建议在WebBrowser控件中(在工具箱下)显示文件.我已经尝试过了,但是没有成功.我的最终目标是能够在Web浏览器的顶部进行批注(或类似的方式),然后将批注与打开的文件一起保存.

我也不具备C#语言方面的经验,因此非常感谢您为解决我的问题提供帮助.

解决方案

您需要DOCX查看器控件.我公司最近免费赠送了我们的多格式WinForms查看器控件-XtremeDocumentStudio .NET Free.它可以显示DOCX,并且在NuGet上可用.它不需要Web浏览器控件即可嵌入在线查看器或本地安装的Word软件. http://www.nuget.org/packages/XtremeDocumentStudio.NETFree/

I'm trying to make my program have the ability to display a Microsoft Word file on a form but not having any luck in doing so. I want to be able to open the file and display it on the form as a Read-Only. So basically just display it's contents. Various users on the web have recommended displaying files in the WebBrowser control (under toolbox). I have tried this but failed to get it working. My end goal is to be able to annotate on top of the web browser (or something of similar manner) and subsequently save the annotations along with the opened file.

I'm not that experienced in the C# language too so any help on how to achieve my problem would be greatly appreciated.

解决方案

You need a DOCX viewer control. My company recently gave away our multi-format WinForms viewer control as a free product - XtremeDocumentStudio .NET Free. It can display DOCX and is available on NuGet. It does not require a Web Browser control for embedding an online viewer or Word software installed locally. http://www.nuget.org/packages/XtremeDocumentStudio.NETFree/

这篇关于在Windows Form C#上打开Word(.docx)文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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