填写表格并打印出的文档 [英] Populate a form and print out document

查看:90
本文介绍了填写表格并打印出的文档的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个word文档这是一个空白表格。我需要能够填补它在编程方式使用.NET,并打印出结果。

I have a word document which is a blank form. I need to be able to fill it in programatically using .NET, and print out the result.

形式我是一个Word文档,但我能明显它转换为PDF格式,如果它是必要的。

The form I have is a Word document, but I could obviously convert this to PDF if it is needed.

推荐答案

正如约瑟夫说,如果是的OpenXML(Office 2007中)的文件,你可以使用管理的.NET类来轻松地更新文档,它基本上改变了一堆XML文件,压缩并更名为.docx。为Office(VSTO)的Visual Studio工具应该可以帮助你,如果需要对Office 2000和2003的办公previous版本中,你可能需要使用办公自动化COM类。

As Josef said, if it's OpenXML (Office 2007) document you can use the managed .net classes to easily update the document, which is basically modifying a bunch of xml files, zipped and renamed to .docx . Visual Studio tools for Office (VSTO) should help you out if need be for Office 2000 and 2003. For previous versions of office you'd need to use Office Automation COM Classes..

现在在word文档更新领域,你需要确定要插入文本。所以,如果你有一些书签或标记,以确定您希望插入文本的地方...你可以寻求到该位置并插入文本。 打印Word文档应该是简单的,因为Word提供了内置的打印支持。应调用正确的方法一样容易。

Now for updating fields in the word document, you'd need to identify where to insert text to. So if you have some bookmarks or markers to identify the places where you'd like to insert text... you can seek to that position and insert text. Printing the word doc should be simple since Word has printing support built in. Should be as easy as calling the right method.

这篇关于填写表格并打印出的文档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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