B4J Question Creating MS Word Documents

T201016

Active Member
Licensed User
Longtime User
Hello everyone,
Can Anyone help me convert the code of the four HTML text formatting tags to MS WORD format
- I present below examples.

It is supposed to be applied later, e.g .: Creating MS Word Documents shows @Erel as a great example ?
Dim wd As WordUtils
wd.Initialize
Dim doc As WordDocument = wd.CreateDocument
doc.Append($" ... "$)

1.EXAMPLE:
1::
<html dir="ltr">
    <head></head>
    <body contenteditable="true">
        <p></p>
        <ul>
            <li><span style="font-family: &quot;Segoe UI&quot;;">•a</span></li>
            <li><span style="font-family: &quot;Segoe UI&quot;;">•a</span></li>
            <li><span style="font-family: &quot;Segoe UI&quot;;">•a</span></li>
        </ul>
        <p></p>
    </body>
</html>

2.EXAMPLE:
2::
<html dir="ltr">
    <head></head>
    <body contenteditable="true">
        <p></p>
        <ol>
            <li><span style="font-family: &quot;Segoe UI&quot;;">1.a</span></li>
            <li><span style="font-family: &quot;Segoe UI&quot;;">2.a</span></li>
            <li><span style="font-family: &quot;Segoe UI&quot;;">3.a</span></li>
        </ol>
        <p></p>
    </body>
</html>

3.EXAMPLE:
3::
<html dir="ltr">
    <head></head>
    <body contenteditable="true">
        <p><span style="font-family: &quot;Segoe UI&quot;; font-size: large;"><strike>Segoe UI 14pt</strike></span></p>
    </body>
</html>

4.EXAMPLE: INSERT Horizontal Rule.
4::
<html dir="ltr">
    <head></head>
    <body contenteditable="true">
        <p><br></p>
        <hr>
    </body>
</html>
 

T201016

Active Member
Licensed User
Longtime User
I'm not sure if this would be of help in your case, but my app has to produce lots of tables and stuff, and I do it in HTML, but instead of trying to convert it to MS Word, I just write the HTML file and call Word to open it from my app (it does open html). Then the users can save it to word or pdf or anything they like.
Welcome you, I have considered such a method and it is certainly a solution, but for now I am looking for a different solution. I used to have a Word tag compendium, but I lost it somewhere. Thanks for the reaction :)
 
Upvote 0
Top