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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

DocIO RemoveEmptyParagraphs broke word fie and RemoveEmptyGroup does not work

Thread ID:

Created:

Updated:

Platform:

Replies:

114621 Nov 28,2013 03:09 AM UTC Jul 7,2016 12:53 PM UTC WinRT 13
loading
Tags: DocIO
Winson Yang
Asked On November 28, 2013 03:09 AM UTC

There is a word template(office 97 - 2003), I open the template use DocIO, then set RemoveEmptyParagraphs = true and save it in code, the word file got a error when I open it.
And set RemoveEmptyGroup = true, the table with mail field of the template  does not been removed.

Sathish K [Syncfusion]
Replied On November 29, 2013 05:57 AM UTC

Hi Winson,

 

Thank you for your interest in Syncfusion products.

 

Could you please provide us the template document you have used along with the sample project or code snippet to reproduce issue at our end? Thereby we can analyze further on this case and provide you the appropriate solution.

 

Please let us know if you have any other questions.

 

Regards,

Sathish                                    


Winson Yang
Replied On December 3, 2013 02:30 AM UTC

Hi, Sathish ,
For your refer.


DocIO_c57f6f13.zip

Sathish K [Syncfusion]
Replied On December 10, 2013 05:52 PM UTC

Hi Winson,

 

Thank you for your update.

 

We are unable to reproduce any of the issues mentioned by you. We have modified your sample to show you the same. Please find the attached sample and refer that. Please modify the sample to reproduce the issue at our end and update us.

 

Please let us know if you have any questions.

 

Regards,

Sathish



DocIO_c639dd20.zip

Winson Yang
Replied On December 11, 2013 01:58 AM UTC

Hi, Sathish,
I open the project you attached, and run it.
Then I generate and save the docx file, open it to check.
The table with the merge field and paragraph with the merge field still here.
"RemoveEmptyParagraphs" and "RemoveEmptyGroup" are not work.


Capture_b8dd5339.zip

Sathish K [Syncfusion]
Replied On December 11, 2013 02:10 PM UTC

Hi Winson,

 

Thank you for your update.

Please do find the below table to illustrate the behaviour of MailMerge properties.

Property Name

Specification

ClearFields

If this property is set as false then we have clear the unmerged field from the generated word document. Default value for this property as true.

RemoveEmptyParagraphs

If this property is set as true then we could remove the paragraph which contain mergefield with empty value.

RemoveEmptyGroup

If this property is set as true then we could remove the group which contain merge fields with empty values.


In the given sample you have set the ClearFields property value as false, caused the unmerged fields are preserved in the generated word document. For resolving this issue, please ignore to set the ClearFields as false. This is not an issue and actual behaviour with MailMerge functionality of DocIO. For your reference, we have modified the sample to meet your requirement. Please do find the sample from the attachment. Try running the sample and let us know if this helps you.

 

Please refer the below UG links for more details on Mail merge functionality of DocIO:

http://help.syncfusion.com/UG/winrt/default.htm#!Documents/mailmerge.htm


http://help.syncfusion.com/UG/winrt/default.htm#!Documents/additionalmailmergef.htm
 

Please let us know if you have any questions.

 

Regards,

Sathish



DocIO_f1323e7e.zip

Winson Yang
Replied On December 12, 2013 01:20 AM UTC

Hi, Sathish,
Thanks for your reply and detail information.
But I run the project which the latest you attach, the empty table still in the generated word file.
The "RemoveEmptyGroup" still not work.


Capture_85417bb1.zip

Sathish K [Syncfusion]
Replied On December 13, 2013 02:05 PM UTC

Hi Winson,

 

Thank you for your update.

 

The actual behavior of "RemoveEmptyGroup" property is to remove the empty paragraph generated between the BeginGroup and EndGroup. It will not remove the empty tables or other text body items preserved in the document. If you want remove the empty table, then you have to find out the index of that table entity and remove that entity.

 

Please let us know if you have any other questions.

 

Regards,

Sathish

Winson Yang
Replied On December 16, 2013 02:57 AM UTC

Hi, Sathish,
Well noted, Thanks for your reply~~!

Sathish K [Syncfusion]
Replied On December 16, 2013 07:16 AM UTC

Hi Winson,

 

Thank you for your update.

 

We are glad that our guidance helped you well. Please let us know if you have any other concerns. We will be happy to help you as always.

 

Regards,

Sathish


A
Replied On July 5, 2016 09:22 PM UTC

Hi Sathish,

I want to remove empty paragraphs in table cells after mail merge. If I set RemoveEmptyParagraphs = true, I see the following error when opening the file:

Ambiguous cell mapping encountered. Possible missing paragraph element. <p> elements are required before every </tc>.

If I do not set the property, there will be no error but empty paragraphs are kept.

Sivasubramani V [Syncfusion]
Replied On July 6, 2016 05:25 AM UTC

Hi Winson,

Thank you for your update.

Could you please provide us the template document along with the sample application to reproduce issue at our end?

It would be much helpful for us to reproduce and analyze the issue at our end.

Please let us know if you have any questions.

Regards,
Sivasubramani. V
 


A
Replied On July 6, 2016 01:22 PM UTC

Hi Sivasubramani,

This happens with a simple template consisting of just a table. For example, you can reproduce the error with attached template if column "Race" of the table is empty.


Attachment: ListContact_faf4a6b0.zip

Priyanga Elangovan [Syncfusion]
Replied On July 7, 2016 12:53 PM UTC

Hi Winson,

We are unable to reproduce the mentioned exception issue with your attached template document. Could you please provide us the sample application or code example to reproduce the issue at our end

It would be much helpful for us to reproduce and analyze the issue at our end.


Please let us know if you have any questions.


Regards,
Priyanga.E 


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

;