Categories > OpenTBS with DOCX >

Convert html-styles to MS office (docx)

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: ibnu arif
Date: 2010-09-28
Time: 03:45

Convert html-styles to MS office (docx)

I use a WYSIWYG editor, which stores the text in html-format.
it is possible to make string that contain html tags like <b>Some text here</b>, the 'Some text here' will change to bold in the generated .docx file?

i had been looking in this forum at the "Convert html-styles to open office doc." post, but i can not understand how to implement it with the MS office (docx) file.

this is my docx template file:
[a;block=begin]
[a.bil] [a.perkara]
[a;block=end]

Thanks for any help in advance,
ihsan

By: Skrol29
Date: 2010-09-28
Time: 12:02

Re: Convert html-styles to MS office (docx)

Hi,

It is potentially quite difficult to convert an HTML content into a Docx content.
You can try by coding you own conversion function which replace several HTML tags into the corresponding OpenXML tags. I don't know if this method is sufficient.
Since you have you conversion function, you can call it in the template using parameter "onformat", but you'll need to customize it a bit.