C#表单中的Word文档? [英] Word document inside C# Forms?

查看:81
本文介绍了C#表单中的Word文档?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在制作一种软件,我想要一种格式,使得它应该具有可以由用户写入的文本区域和无法修改的固定图像,以便用户在写入那里的内容之后可以在其中打印信笺.如何实现此目的以简单的方式.如果我的问题有误,请纠正我.

I am making software in which i want one form such that it should have text area that can be written by user and the fix images which cant be modified,so user can print there letterhead after writing there content.how to implement this in simple manner.correct me if there is error in my question.

推荐答案

有几种解决方法.通过使用Office文档的Open XML SDK,可以在没有第三方控制的情况下执行此操作.该SDK提供了处理Office文档及其内容的方法.您可以使用它们来加载一个模板文件,该文件在标题部分包含您的信笺.在RTF控件中显示文档的正文,然后在用户完成操作后将其保存到新的Office文档中.

另外,还有一些第三方控件,例如Telerik的RichEdit,它们知道如何打开/保存Office文档并提供完整的编辑环境.目前,我们正在其中一种解决方案中使用该控件来做完全相同的事情.除了我们将结果文档存储在数据库blob字段中,而且我们的界面是Silverlight.
There are a few ways to go about this. You can do this without a third-party control by using the Open XML SDK for Office Documents. That SDK provides methods to manipulate Office documents and their contents. You could use these to load a template file which contained your letterhead in the header section. Present the body of the document in a rich text control and then save it out to a new Office document when the user is done.

Alternately, there are some third party controls such as Telerik''s RichEdit that know how to open/save Office documents and present a full editing environment. We are currently using that control in one of our solutions doing the exact same thing. Except we store the resulting document in a database blob field and our interface is Silverlight.


这篇关于C#表单中的Word文档?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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