Generate MHT from HTM file

1.8k Views Asked by At

I have a htm page in my disk (C:\pages\page1.htm).

This page link CSS and gif (C:\pages\img\img1.gif, c:\pages\css\css1.css).

How can I generate MHT file ?? Only using C# .NET managed.

3

There are 3 best solutions below

0
On

Why do you need this? MHT is IE-only format of storing webpages.

However, if you will open one MHT, you will quickly get an idea how to create it by hands.

0
On

MHT is basically a MIME file, which means it's structured very much like an e-mail. There are some global headers at the top (namely, the Content-Type, which also specifies the content boundary). Each file in the archive is separated by the content boundary, and has its own set of headers. See a MHT representation of this page - much of the content is self-explanatory.

1
On

Windows 7 includes Recording Steps and generate mht file.

I thinks mht file can have several use. I need generate mht file (one mht file), for create several htm files, css , jpg, wmv...

thanks