Share via

Converting Word to clean HTML

Anonymous
2022-05-24T14:49:43+00:00

I have to take very long documents and create HTML. Converting from Word to HTML provides very dirty HTML. Is there a program that you use to convert Word to clean HTML?

Microsoft 365 and Office | Word | For business | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

5 answers

Sort by: Most helpful
  1. Anonymous
    2022-05-24T15:46:47+00:00

    If by "dirty" you're referring to the Word-specific HTML (all the stuff starting with "w:") and style definitions, you can save the document without that by opening the Save As dialog (F12) and choosing the "Filtered Webpage" format.

    10+ people found this answer helpful.
    0 comments No comments
  2. Anonymous
    2022-05-25T05:53:20+00:00

    Don't use Word to create HTML. Sorry.

    .

    When Word does a SAVE AS to HTML format, it adds a lot of repetitive, unneeded HTML. Sorry Word has never had an option to create "clean" HTML. I have not seen any tools that purport to clean it up..

    .

    9 people found this answer helpful.
    0 comments No comments
  3. Anonymous
    2022-05-24T15:59:25+00:00

    Thank you Jay. I should have been more clear. In the past when I've used Word to create HTML, it adds loads of unnecessary code and the character # goes high.

    For example, when I converted a table, this is part of the code:
    <td style="width: 96.1pt; border: 0.75pt solid #000000; padding: 1.08pt; vertical-align: top;">

    <p style="margin-top: 0pt; margin-bottom: 0pt; font-size: 9pt;"><span style="font-family: Calibri;">jwxxprxy01</span></p>

    <p style="margin-top: 0pt; margin-bottom: 0pt; font-size: 9pt;"><span style="font-family: Calibri;">jwxxprxy02</span></p>

    <p style="margin-top: 0pt; margin-bottom: 0pt; font-size: 9pt;"><span style="font-family: Calibri;">jwxxprxy03</span></p>

    <p style="margin-top: 0pt; margin-bottom: 0pt; font-size: 9pt;"><span style="font-family: Calibri;">jwxxprxy04</span></p>

    </td>

    If I did this myself, I would have used <br> between each of the lines:

    <td style="width: 96.1pt; border: 0.75pt solid #000000; padding: 1.08pt; vertical-align: top;">

    <p style="margin-top: 0pt; margin-bottom: 0pt; font-size: 9pt;"><span style="font-family: Calibri;">jwxxprxy01<br>jwxxprxy02<br>jwxxprxy03<br>jwxxprxy04</span></p>

    </td>

    I will try the Filtered Webpage and see what happens.

    Thank you!

    3 people found this answer helpful.
    0 comments No comments
  4. Anonymous
    2022-05-27T15:54:28+00:00

    Tin - When you say copy and paste into NotePad, do you mean after I convert to HTML then open in Notepad? We currently use WordCleaner now Doc Converter Pro. The company I work for is not letting us renew. I currently use Word Cleaner and then open the HTML file in NotePad. I did try what Jay suggested and used the save as Web Filtered. It worked decently. It does require some clean-up but better than nothing. Thanks for your help.

    1 person found this answer helpful.
    0 comments No comments
  5. Anonymous
    2022-05-25T02:18:21+00:00

    Hi LopaP:

    You can try Jay Freedman MVP's suggestion first to see if it helps you.

    In addition to that, I'd also like to know if the same problem occurs if you copy and paste the code directly into the Notepad. Notepad is a basic application that comes with the Windows operating system; It is commonly used to write and save texts.

    Best regards,

    Tin

    0 comments No comments