且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

填充Asp.Net中的Word文档

更新时间:2023-02-08 09:47:36

在Word 2010中,单击邮件,然后单击选择收件人和使用现有列表。在对话框中,您可以访问新源...这将允许您查询SQL Server或其他源,或者您也可以在对话框中浏览数据查询文件或包含列表的Excel文件。



在此之后,您可以单击插入合并域将字段插入到文档中。


这是一个很好的例子 [ ^ ]

Hi,
Can anyone please guide me on how to popluate a word document form with values retrieved from DB?

Thanks.
Ann

In Word 2010 you click on Mailings, then on Select Recipients and Use Existing List. In the dialog you clieck on New Source... This will allow you to query SQL Server or other sources or you could also in the dialog browse for a Data Query file or an Excel file containing your list.

After this, you can click on Insert Merge Field to insert your fields into the document.


This is a good example[^]