Question

If you faced with situation when you need to edit .mht file (for example: add some text to site).

Could you please suggest the best way of editing .mht(web archive) files?

What I've tried:

  1. (editors like: notepad, word);

  2. I-Explorer add-ons (like HTML Quick edit Bar)

Was it helpful?

Solution

An MHTML file is a web page archive format. It is meant to be stored and viewed but not to be edited directly.

However, you can easily extract the MHTML file to a regular HTML document (with linked files), edit it with your favorite HTML editor and then export it back to an MHTML archive (including the linked files).

Since you're using Internet Explorer, note that you can open/save between HTML and MHTML files. This can effectively be used to unpack, edit and repack the MHTML archive. Google Chrome can do this as well.

You may also find software that are able to edit the MHTML file directly (doing the unpacking/repacking in the background). Microsoft Word seems to be able to do this, but depending on your document structure, it may impact the content layout.

OTHER TIPS

A quick look at the wikipedia entry for MHTML shows that it's an archive format, a little bit like a zip or rar archive. In order to edit a .mht you will need to unpack it, edit the required file then repack the archive.

You don't say what platform/software you are using but if you do a websearch for ".mht unpacker" you should be able to find something to do the job.

Unpacking a .mht to a local folder, edit the code and re-save it to .mht won't work. If you save to .mht from a local drive none of the linked files (pictures and whatever else is used for the page other than included within the html file) will be stored in the container.

I used Word (office 365) to open modify and save the changes. Maybe is not a optimal solution but works.

WizBrother.com WizHtmlEditor is a super capable fast and light wysiwyg editor that is ideal for quick assembly of elements because it can accept almost anything you throw at it - an entire screen of formatted html including pictures, rtf, drag-n-drop from a browser, and from clipboard, even media files. It doesn't care if it's editing MHT or HTML or several other formats. It's free - and they have a bulk converter BTW. Do a search and see.

I just open and edit with Microsoft Word. This is actually the official approved way of doing it BTW.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top