Hy,
I create a Template (Dotx) where i put 3 Mergefield.
MailMerge with 3 rows take 1500 ms.
If i put a {Page} Field, it take 3500 ms (idem if i have only 1 row).
Why is it so slow ?
Thanks
Hy,
I create a Template (Dotx) where i put 3 Mergefield.
MailMerge with 3 rows take 1500 ms.
If i put a {Page} Field, it take 3500 ms (idem if i have only 1 row).
Why is it so slow ?
Thanks
Hi,
i don't know why you talk about PDF/XPS.
I create a simple Template with nothing else 2 word fields {DATE} {PAGE} and 1 MERGEFIELD {NAME} and execute mailmerge with a XML file containing 3 lines with "Name" field.
My Template (a DOTX) is not complicated and action to save is not concerned : it's the execute command that take 3500 ms, nothing else.
And i try with several templates, several database...it's always the same.
Thanks
Hi,
sw.Reset();
sw.Start();
Document doc = new Document(@"C:\Temp\template.docx");
doc.MailMerge.Execute(new string[] { "mf1", "mf2" }, new Object[] { 1, 2 });
doc.Save(@"C:\Temp\out.docx");
sw.Stop();
Console.WriteLine(string.Format("Elpased time: {0} ms", sw.ElapsedMilliseconds));
Console.WriteLine(string.Format("Peak memory: {0} Mb", Process.GetCurrentProcess().PeakWorkingSet64 / (1024f * 1024f)));