Thanks for your request. I managed to reproduce the problem on my side. Your request has been linked to the appropriate issue. You will be notified as soon as it is resolved.
Best regards.
Just to add, this was originally tested in 7.0.0.0 however it is still present in 8.0.0.0. It is also worse in 8.0.0.0 as the message “Error! Unknown op code for conditional.” appears several times.
Hi,
I am working on your issues. Most of them are already fixed in the current database. I just wanted to make a remark about the second mail merge region (which is in the table inside the IF field). You see, it will not be populated because only the first region from regions with the same name are populated. This is because the data source interface does not have a way to reset to the first record, and to avoid confusions we have also blocked it programmatically. So it is expected the second region is not populated. But I tried to exclude one of the regions, and then the remaining one was merged correctly, whether or not it was inside a field.
Please expect a new release addressing all of your issues later in December.
Thanks.
Thanks for your request. The problem occurs because IF field code is incorrect in your case. First of all there should be white spaces before and after a condition operator. { IF 1 = 1 "true text" "false text" }
Also, I suppose {PAGE} and {NUMPAGES} in your condition are supposed to be fields, but in your document they are just text. So please correct your document and all will work fine.
Please let me know if you need more assistance, I will be glad to help you.
Best regards.
Thank you for additional information. I cannot reproduce the problem on my side. As I can see all works fine on my side. Here is my test code:
// Create dummy datasource.
DataTable tableMatriz = new DataTable("Matriz");
tableMatriz.Columns.Add("MatrizNome");
tableMatriz.Columns.Add("MatrizEscopo");
for (int i = 0; i <10; i++)
tableMatriz.Rows.Add(new object[]
{
string.Format("MatrizNome_{0}", i), string.Format("MatrizEscopo_{0}", i)
});
// Open template.
Document doc = new Document(@"Test001\in.docx");
// Fill region with data.
doc.MailMerge.ExecuteWithRegions(tableMatriz);
// Fill mergefield inside IF field.
doc.MailMerge.Execute(new string[]
{
"ModeloMatrizesTotalCount"
}, new object[]
{
"1"
});
// Save output document.
doc.Save(@"Test001\out.docx");