ASP.NET Word 邮件合并

发布于 2024-09-16 04:54:44 字数 310 浏览 3 评论 0原文

我需要创建一个从网络应用程序合并信件和/或信封模板的过程。我们使用 VS2010、C# (.net 4.0)、asp.net 和 Office 2007。用户从列表中选择一堆帐户,我需要收集这些帐户的信息以进行合并。一个问题是,如果我查找一个帐户并且两个帐户持有人之一已经去世,我需要根据该信息更改问候语。例如,在大多数情况下,信中会提到鲍勃·史密斯先生和夫人之类的内容。但如果鲍勃死了,那么它只会说玛丽·史密斯夫人。

我还需要它在客户端以准备打印的方式打开。因此,如果信件有 1 页,并且用户选择了 100 个帐户,则单词文档应该将信件与等待打印的 100 个帐户合并。最好的方法是什么?

I need to create a process of merging letters and/or envelope templates from a web app. We are using VS2010, C# (.net 4.0), asp.net, and Office 2007. The user selects a bunch of accounts from a list, and I need to collect the info for those accounts for merge. One catch is that if I look up an account and one of the two account holders has passed away, I need to change the greeting based on that info. For example, in most cases the letter would say something like Mr. and Mrs. Bob Smith. But if bob is dead, then it would just say Mrs. Mary Smith.

I also need it to open on the client side in word ready to print. So if the letter is 1 page, and the user selects 100 accounts, the word doc should have the letter merged with the 100 accounts just waiting for print. What is the best way to do this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

浪菊怪哟 2024-09-23 04:54:44

Silverlight 可能是一个很好的选择,因为它允许您读取本地文件并对其内容执行某些操作,它还有一个打印 API。

但是您想在客户端或服务器上的哪里进行打印?

Silverlight might be a good candidate for this as it allows you to read local files and do soemthing with its contents, it also has a printing api.

However where do you want to do the printing on the client or the server?

呆° 2024-09-23 04:54:44

作为概述,您需要在模板周围使用 wcf 服务,然后使用 silverlight 来实际创建文档并在客户端上打印它们。

As an overview you would need to use wcf services around your templates and then suse silverlight to actually create the documents and print them on the client.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文