This message was posted using Aspose.Live 2 Forum
Hi
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
Thanks for your request. As I can see Aspose.Words recognizes date string perfectly. Here is code I used for testing. I also attached my input and output documents.
// Open template.
Document doc = new Document(@"Test001\in.doc");
// Execute mail merge.
doc.MailMerge.Execute(new string[] { "test" }, new object[] { "10/01/2010" });
// Save output document
doc.Save(@"Test001\out.doc");
I use the latest version of Aspsoe.Words for testing. You can download it from here:
http://www.aspose.com/community/files/51/.net-components/aspose.words-for-.net/category1188.aspx
Best regards.
Hi,
“Calibri”,“sans-serif”;mso-fareast-font-family:SimSun;mso-fareast-theme-font:
minor-fareast;mso-bidi-font-family:“Times New Roman”;mso-ansi-language:EN-US;
mso-fareast-language:ZH-CN;mso-bidi-language:AR-SA”>“04/10/2012
04:09”, so they just want “04/10/2012” to appear in merged document. dd.MM.yyyy
“Calibri”,“sans-serif”;mso-fareast-font-family:SimSun;mso-fareast-theme-font:
minor-fareast;mso-bidi-font-family:“Times New Roman”;mso-ansi-language:EN-US;
mso-fareast-language:ZH-CN;mso-bidi-language:AR-SA”>
“Calibri”,“sans-serif”;mso-fareast-font-family:SimSun;mso-fareast-theme-font:
minor-fareast;mso-bidi-font-family:“Times New Roman”;mso-ansi-language:EN-US;
mso-fareast-language:ZH-CN;mso-bidi-language:AR-SA”>I’ve attached a sample source file. I hope you can help with this issue. We have release our product with Aspose 11.1 (words for java).
“Calibri”,“sans-serif”;mso-fareast-font-family:SimSun;mso-fareast-theme-font:
minor-fareast;mso-bidi-font-family:“Times New Roman”;mso-ansi-language:EN-US;
mso-fareast-language:ZH-CN;mso-bidi-language:AR-SA”>
“Calibri”,“sans-serif”;mso-fareast-font-family:SimSun;mso-fareast-theme-font:
minor-fareast;mso-bidi-font-family:“Times New Roman”;mso-ansi-language:EN-US;
mso-fareast-language:ZH-CN;mso-bidi-language:AR-SA”>From reading other posts this should be formatted without any extra coding on our side?
“Calibri”,“sans-serif”;mso-fareast-font-family:SimSun;mso-fareast-theme-font:
minor-fareast;mso-bidi-font-family:“Times New Roman”;mso-ansi-language:EN-US;
mso-fareast-language:ZH-CN;mso-bidi-language:AR-SA”>
“Calibri”,“sans-serif”;mso-fareast-font-family:SimSun;mso-fareast-theme-font:
minor-fareast;mso-bidi-font-family:“Times New Roman”;mso-ansi-language:EN-US;
mso-fareast-language:ZH-CN;mso-bidi-language:AR-SA”>I build the IMailMergeDataSource from our data and call the Doc.getMailMerge().execute(mergeDataSource);
“Calibri”,“sans-serif”;mso-fareast-font-family:SimSun;mso-fareast-theme-font:
minor-fareast;mso-bidi-font-family:“Times New Roman”;mso-ansi-language:EN-US;
mso-fareast-language:ZH-CN;mso-bidi-language:AR-SA”>
“Calibri”,“sans-serif”;mso-fareast-font-family:SimSun;mso-fareast-theme-font:
minor-fareast;mso-bidi-font-family:“Times New Roman”;mso-ansi-language:EN-US;
mso-fareast-language:ZH-CN;mso-bidi-language:AR-SA”>Do I need to do extra for this to work or can the customer fix up the fields in their template?
“Calibri”,“sans-serif”;mso-fareast-font-family:SimSun;mso-fareast-theme-font:
minor-fareast;mso-bidi-font-family:“Times New Roman”;mso-ansi-language:EN-US;
mso-fareast-language:ZH-CN;mso-bidi-language:AR-SA”>
“Calibri”,“sans-serif”;mso-fareast-font-family:SimSun;mso-fareast-theme-font:
minor-fareast;mso-bidi-font-family:“Times New Roman”;mso-ansi-language:EN-US;
mso-fareast-language:ZH-CN;mso-bidi-language:AR-SA”>Thanks,
“Calibri”,“sans-serif”;mso-fareast-font-family:SimSun;mso-fareast-theme-font:
minor-fareast;mso-bidi-font-family:“Times New Roman”;mso-ansi-language:EN-US;
mso-fareast-language:ZH-CN;mso-bidi-language:AR-SA”>Eamonn
doc.FieldOptions.FieldUpdateCultureSource = FieldUpdateCultureSource.FieldCode;
doc.MailMerge.Execute(new string[] { "quot_createddate" }, new object[] { new DateTime(2011, 1, 01) });