Hi Ron,
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
Thanks for your request. IF field’s code looks like the following:
{ IF }
If condition is true – true_value text is displayed, otherwise false_value text is displayed. In your case IF field looks like the following:
{ IF "{ MERGEFIELD isVMS }" = "true" " On VMS, enter the following command:
$ BACKUP/LOG/IGNORE=INTERLOCK :[.....]*.* :[.....]*.*
If the above command does not work with the current system configuration, the directory should be FTP’d from the SOURCE node to the TARGET node." " On AIX and HP-UX, enter the following command:
/usr/bin/scp –rp :///* //" }
As you can see there is a mergefield in the condition expression. After executing the following code:
Document doc = new Document(@"Test001\in.doc");
doc.MailMerge.Execute(new string[] { "isVMS" }, new object[] { "true" });
doc.Save(@"Test001\out.doc");
Please see the following link to learn more about mail merge:
http://www.aspose.com/documentation/.net-components/aspose.words-for-.net-and-java/mail-merge-and-reporting.html
Mergefield with name isVMS is replaced with value “true” and in the output document you see only true text. IF Field code will look like this:
{ IF "true" = "true" " On VMS, enter the following command:
$ BACKUP/LOG/IGNORE=INTERLOCK :[.....]*.* :[.....]*.*
If the above command does not work with the current system configuration, the directory should be FTP’d from the SOURCE node to the TARGET node." " On AIX and HP-UX, enter the following command:
/usr/bin/scp –rp :///* //" }
Best regards.