We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

IF and mergefields

Thread ID:

Created:

Updated:

Platform:

Replies:

80499 Apr 7,2009 01:56 AM Apr 8,2009 07:35 AM Windows Forms 1
loading
Tags: DocIO
Administrator [Syncfusion]
Asked On April 7, 2009 01:56 AM

I have a .DOC template file that has the following fields, for some reason the { MERGEFIELD "Company_Name" } that immediately follows the IF is " ", instead of empty "".
The { MERGEFIELD "Company_Name" } at the end of the statement is empty. I can confirm that the value passed to DocIO is an empty string.

Using the WordDocument.MailMerge functionality.

Template:
{ IF "{MERGEFIELD Company_Name }" = "" "{ MERGEFIELD "Contact_Name"}" "{MERGEFIELD Company_Name }" }

Actual field output:
{ IF " " = "" "Tim" "" }

Expected field output:
{ IF "" = "" "Tim" ""}



Bhuvaneswari P [Syncfusion]
Replied On April 8, 2009 07:35 AM

Hi Tim,

Thank you for your inquiry.

1. Regarding field update:

Field value updated only after opened in MS word and update the fields (Select all (Ctrl+ A) and then press F9). Fields values and condition will not be executed by programmatically it can be done only after opened in MS word and giving field update. This is the behavior.

2. Merge field adding one extra space when field inside the if condition
I am able to reproduce the issue. The issue "Merge field adding one extra space when field inside the if condition“ reported by you is suspected to be a defect. We have forwarded this to our Development Team for further analysis. We will update you with our Development Team’s response in two business days.

Also we have updated the same in your direct trac incident. Please follow up it for the further questions.

Best Regards,
Bhuvana



CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;