Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.

Mon Feb 20, 2017 4:24 am

Hello,

IF { MERGEFIELD planId } = 3 "X" "N"

This doesn't seem to work when trying a mailmerge (document.MailMerge.ExecuteWidthNestedRegion(dsData, list)).Are word conditional fields supported?

Thanks

tonymayoral
 
Posts: 2
Joined: Wed Feb 10, 2016 2:05 pm

Mon Feb 20, 2017 5:59 am

Dear tonymayoral,

Thanks for your inquiry.
I have tested the scenario you mentioned with latest Spire.Doc Pack(hot fix) Version:5.8.47, it can work fine. Please try to use this version.
If the issue still exists, we will appreciate it if you could provide us the sample files and the code you were using for investigation.

Thanks,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Mon Feb 20, 2017 6:01 pm

Tried with latest version but still doesn't work. Values are being merged correctly but Word conditional fields are being ignored...


document.MailMerge.ExecuteWidthNestedRegion(dsData, list);
document.SaveToFile("file.doc");

Fields with a conditional formula such as
IF { MERGEFIELD planId } = 3 "X" "N"
are not being executed.

tonymayoral
 
Posts: 2
Joined: Wed Feb 10, 2016 2:05 pm

Tue Feb 21, 2017 2:19 am

Dear tonymayoral,

Thanks for the information.
Please try to use the below code.
Code: Select all
document.IsUpdateFields = true;

If the issue still happens, I am afraid that the information you provided cannot help us reproduce the issue on my side. We will much appreciate it if you could provide us the input documents, and the entire code you were using, so that we can reproduce the issue and then investigate the issue further.

Many thanks,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Return to Spire.Doc