How do I convert a word document into a single .html web page?

2

My title needs some elaboration.

I don't want the "single webpage" option, as that creates an mht file In Microsoft Word, and while Chrome can open it, I see the Firefox has issues

enter image description here

enter image description here

Here's the file as a docx https://we.tl/XN4V8w6flT or from ge.tt http://ge.tt/8r0iFNd2 though that can easily be created just by having some text and highlighting part of it . And that's just a demonstration file, I may have lots more text and lots more blocks of text highlighted.

I don't want an MHT file 'cos firefox doesn't open it straight away, and if I want to send it to somebody then I think an html file is more compatible.

I can get Word to produce an html webpage but then it makes a subdirectory with these xml files in it. I don't want that, I want one file.

enter image description here

How can I integrate these xml files or their equivalent, into an html file?

barlop

Posted 2016-08-13T14:18:16.743

Reputation: 18 677

Is there any reason they cannot just use the Microsoft Word Viewer or an online viewer from Microsoft? https://support.microsoft.com/en-gb/kb/891090

– Mokubai – 2016-08-13T14:22:43.740

@Mokubai if that were the question, then in theory a person could use microsoft word and not view the webpage, or in theory it could be an rtf file and easy to view , or they might get the office compatibility pack, or it could be saved in an old ms word version, or other options to view contents, but the question is not how can they view the contents of the file. The question is how to make it into a webpage – barlop – 2016-08-13T14:23:21.047

I was just curious if there was a specific reason, or if some other tool might fit the job better. Word has, historically, done an awful job of creating html files and I'm curious as to why this specific format when others such as PDF are better for document transfer. Not meaning to detract from your question, just trying to understand the "why" of it. – Mokubai – 2016-08-13T14:30:45.303

i'm curious about converting it into a single webpage – barlop – 2016-08-13T14:36:38.193

1If I do a File -> Save As then save as "Web Page, Filtered" instead of just "Web Page" then I do not get these extra files, I suspect it rips out some of the formatting though. – Mokubai – 2016-08-13T14:36:55.367

Answers

2

If you don't care about the formatting and just want a "simple" webpage then you can save as Web Page, Filtered which will completely strip out all the document theme data and pare everything back to basic text formatting and standard html. You will still get this folder created if you have any images in your document, but not with these particular document theme and style files.

Word is intended as a feature rich editing package with linked styles and embedded data, saving as "just" a webpage means it need to export a lot of information about those styles and that is what these files are.

They contain information on what files actually make up the html file so that a compatible reader can get the formatting "mostly" right.

From Microsoft Answers: What is web page filtered?

The difference is that with the web page option, a whole bunch of custom Word style elements are stored inside the HTML document. When you choose the filtered option, those elements will be removed. But in both cases you will get access to only a very limited set of the HTML and CSS functionality that exist in a real HTML editor.

Mokubai

Posted 2016-08-13T14:18:16.743

Reputation: 64 434

Good answer but re your mention of pictures - Obviously if it has pictures in it then it won't be in the same file, as that's impossible in HTML. But something like highlighting is standard HTML and CSS, so hence my expectation(which fortunately has been met), that there'd be a reasonable (i.e. not completely manual), way to make it into a single file – barlop – 2016-08-13T15:06:01.190

2

@barlop - HTML actually does support embedded pictures in the mainstream browsers as seen in this question. Due to the bulk it adds, it's usually reserved for small images like icons.

– GuitarPicker – 2016-08-13T15:29:27.117