使用C#表单中的数据完成Word文档 [英] Complete Word Document with data from a C# form

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

问题描述

你好,

我有以下情况:我有一个Word文档的模板(比如说度假申请之类的文档).我想添加令牌,例如< name> ;、< job>依此类推,等等,当我单击表单控件时,我希望程序用C#表单中的数据替换标记,并用完整的值而不是标记打开Word文档.

我已经在网上搜索过,如果可能的话,我不希望使用XML方法.

预先感谢您的回答.

Hi there,

I have the following situation: I have a template for a Word document (let''s say a document such as a vacation application). I want to add tokens such as <name>, <job> and so on and when I click a form control, I want the program to replace the tokens with data from my C# form and open the Word document with the completed values instead of tokens.

I have searched the web and I don''t want the XML approach if it''s possible.

Thanks in advance for your answers.

推荐答案



我终于解决了.我在 http://www上找到了一个很好的教程.techrepublic.com/blog/howdoi/how-do-i-modify-word-documents-using-c/190 [ [ ].希望它对我有所帮助
Hi,

I finally solved it. I found a very good tutorial on http://www.techrepublic.com/blog/howdoi/how-do-i-modify-word-documents-using-c/190[^] []. Hope it helps others as it helped me


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

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