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.
Syncfusion Feedback

Updating IF fields in word with DocIO won't work correctly

Thread ID:

Created:

Updated:

Platform:

Replies:

130125 Apr 24,2017 07:50 AM UTC Apr 26,2017 05:03 AM UTC ASP.NET Web Forms 3
loading
Tags: DocIO
Cubrilo Milos
Asked On April 24, 2017 07:50 AM UTC

Hello,

I have a problem with updating field values for dates. I saw a similar case in thread ID 121128 but it won't work for me, although I think it should.
Here is what I am doing:

Have a word template that needs filling in fields from database on runtime.
Fields are in tables. In case there is no date I set that value in column to 0 and all values go to their places in rows of table.
Then I call:
document.MailMerge.ExecuteGroup(table)
document.UpdateDocumentFields()

If I try to set field from quick parts -> fields -> IF
like this:
IF «ProjectEndDate» = 0 "ongoing" «ProjectEndDate»
I get «ProjectEndDate» everywhere, so no update. Tried also experimenting with quotes on 0 and projectenddate.

If I try to use ctrl+f9 and write it like this
{ IF «ProjectEndDate» = 0 "ongoing" «ProjectEndDate» \*MERGEFORMAT }
I get the result returned but also the whole expression:
01.2017 - 0 = "0" "ongoing" 0 \* MERGEFORMAT ongoing
or
12.2016 - 8/22/2017 2:00:00 AM = "0" "ongoing" 8/22/2017 2:00:00 AM \* MERGEFORMAT 8/22/2017

Anyone can help about this?


Sethumanikkam Yogendran [Syncfusion]
Replied On April 25, 2017 04:47 AM UTC

Hi Cubrilo,

Thank you for contacting Syncfusion support.

We are unable to reproduce the mentioned issue with the given details. Please find the below sample which we have tried at our end to reproduce the issue.
Sample link

Kindly provide us sample or modified sample of above along with input template, and product version of Essential Studio which will helpful to reproduce the issue at our end and to provide you the appropriate solution at the earliest.

Please let us know if you have any other questions.

Regards,
Sethumanikkam.Y


Cubrilo Milos
Replied On April 25, 2017 06:35 AM UTC

Thank you for your sample, yes it works, and it made me realize that the problem is that after filling bookmark sections I format all bookmarks as html and re-append it to
document because I have html on some places, so that is the problem. I'll have to be selective about what is formatted an what is not.

Thank you for your help.

Sethumanikkam Yogendran [Syncfusion]
Replied On April 26, 2017 05:03 AM UTC

Hi Cubrilo,

Thank you for your update.

We are happy to hear that the provided sample resolved your requirement. Please let us know if you need any further assistance on this. We will be happy to assist you as always.

Please let us know if you have any other questions.

Regards,
Sethumanikkam.Y


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.

Warning Icon 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.Close Icon

;