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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Table formatting is not working

Thread ID:





140898 Nov 13,2018 11:59 AM UTC Nov 14,2018 09:50 AM UTC UWP 1
Tags: DocIO
Muhammad Mobeen
Asked On November 13, 2018 11:59 AM UTC


I am creating a table in word document at runtime. But table's content formatting is not applied. I have applied font style, font size on table but its not applied on table.
Please guide me how to resolve this.

Sample project is attached with this.


Attachment: DocumentGenerations_b6ae791d.zip

Dilli Babu Nandha Gopal [Syncfusion]
Replied On November 14, 2018 09:50 AM UTC

Hi Muhammad, 

Thank you for contacting Syncfusion support. 

On analyzing the given sample, we found that the Replace functionality is performed with save formatting(source) due to which the table font(destination) wasn’t considered. To preserve the table font in Replace functionality, save formatting must be disabled. Please find the code example which illustrates the above behavior. 
public WordDocument FindPlaceHolderAndInsertTable(WordDocument wrd, WTable table, string placeHolderName) 
    //Add the table to the text body part. 
    TextBodyPart bodyPart = new TextBodyPart(wrd); 
    //Replace the place holder text with the table. 
    wrd.Replace(placeHolderName, bodyPart, true, true, false); 
    return wrd; 

We have modified the sample which can be downloaded from following link. 

Please let us know if you have any questions. 

Dilli babu. 


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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

Live Chat Icon For mobile
Live Chat Icon