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
close icon

Applying styles with .AppendHTML (DocIO)

I have HTML fragments which I inserted into a table cell as part of a word document, and I am trying to map the Word Styles to the HTML tags. I managed to get it partially working by adding styles to the document using the following:

style = (IWParagraphStyle)document.AddParagraphStyle("Heading 2");
style.CharacterFormat.FontSize = 18;
etc...

and the

tags do get rendered with the proper formatting. However, I now want to assign styles to other tags such as

and

  • etc. and I need a way to map the Word style to the HTML tag?

    I don't know if I am on the right track, but I can't find anything in the documentation.

    thanks,





  • 4 Replies

    BP Bhuvaneswari P Syncfusion Team January 19, 2009 01:25 PM UTC

    Hi John,

    Thank you for your interest in Syncfusion products.

    We can only convert and insert the HTML tags into the word document. But it is not possible to format the text based on the tags. You can format those paragraphs after inserted the content HTML tags into the document, but not based on the tags.

    Please let me know if you have any questions.

    Best Regards,
    Bhuvana




    JS John SivillaDUPLICATE January 22, 2009 08:26 PM UTC

    thanks for the response... I have another question.

    I have inserted some HTML into a document. The HTML contains
  • tags which, when rendered in Word, are converted to a numbered list. When the text of the item spans more than the length of a line the text on the second line is not aligned with the text of the first.

    How do I do this?

    thanks,




  • JS John SivillaDUPLICATE January 22, 2009 08:53 PM UTC

    Also.... How do you set Headers to appear everywhere but on the first page?

    thanks,



    BP Bhuvaneswari P Syncfusion Team January 27, 2009 01:32 PM UTC

    Hi John,

    Thanks for the details.

    I am afraid that I unable to reproduce the list issue. It’s working fine when converting the document with list to HTML document.
    Please refers to the below sample:
    http://www.syncfusion.com/uploads/redirect.aspx?file=DocToHTML1_1d45d559.zip&team=support

    Please have a look into the sample and please provide your sample to reproduce the issue in our end with the below system details.

    1. Essential Studio version
    2. Office version, Browser details
    3. OS details.

    Regarding the Header/Footer:

    Currently we don't have support for this feature and we have forward regarding this to our development team and will update the details within two business days.

    Best Regards,
    Bhuvana



    Loader.
    Live Chat Icon For mobile
    Up arrow icon