Tab 1
此 Demo 展示如何使用邮件合并填充数据到 Word 模板。
Agreement Start Date: | |
Agreement End Date: | |
Agreement Extension Date: | |
Documentation Start Date: | |
Documentation End Date: | |
downloads
|
如果这不是您想要的 Demo,您可以通过填写表格获取免费定制 Demo。
如您有与我们产品相关的其他技术问题,请联系 该Email地址已收到反垃圾邮件插件保护。要显示它您需要在浏览器中启用JavaScript。;销售相关的问题,请联系 该Email地址已收到反垃圾邮件插件保护。要显示它您需要在浏览器中启用JavaScript。。
Tab 2
using System;
using Spire.Doc;
namespace DemoOnlineCode
{
class MailMerge
{
public void demoMailMerge(String docFile)
{
Document document = new Document(docFile, FileFormat.Auto);
string[] values = {
DateTime.Today.AddYears(-5).ToString("yyyy-MM-dd"),
DateTime.Today.AddYears(5).ToString("yyyy-MM-dd"),
DateTime.Today.AddYears(6).ToString("yyyy-MM-dd"),
DateTime.Today.AddYears(-2).ToString("yyyy-MM-dd"),
DateTime.Today.AddYears(2).ToString("yyyy-MM-dd")
};
string[] fields = {
"SubGrantPAStartDateValue",
"SubGrantPAEndDateValue",
"SubGrantPAExtensionDateValue",
"SubGrantPSStartDateValue",
"SubGrantPSEndDateValue"
};
document.MailMerge.Execute(fields, values);
document.SaveToFile("demo.doc", FileFormat.Doc);
}
}
}
Tab 3
Imports Spire.Doc
Namespace DemoOnlineCode
Class MailMerge
Public Sub demoMailMerge(docFile As [String])
Dim document As New Document(docFile, FileFormat.Auto)
Dim values As String() = {
DateTime.Today.AddYears(-5).ToString("yyyy-MM-dd"),
DateTime.Today.AddYears(5).ToString("yyyy-MM-dd"),
DateTime.Today.AddYears(6).ToString("yyyy-MM-dd"),
DateTime.Today.AddYears(-2).ToString("yyyy-MM-dd"),
DateTime.Today.AddYears(2).ToString("yyyy-MM-dd")
}
Dim fields As String() = {
"SubGrantPAStartDateValue",
"SubGrantPAEndDateValue",
"SubGrantPAExtensionDateValue",
"SubGrantPSStartDateValue",
"SubGrantPSEndDateValue"
}
document.MailMerge.Execute(fields, values)
document.SaveToFile("demo.doc", FileFormat.Doc)
End Sub
End Class
End Namespace