Ask a Question

Convert mht file to zip

Regular Contributor

Convert mht file to zip

How can I convert a mht file into zip ?


Community Hero



Search for it on Your local machine disc -> use Packer or custom actions to obtain that file.

Esteemed Contributor

An MHT file is not a compressed file like a ZIP file is.  You can't open it and examine the contents.

What are you hoping to do by making such a conversion?  Perhaps there's abetter way to meet your needs.

Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
Regular Contributor

Hi @tristaanogre  @Wamboo 

Thanks for reply... and apologies I have mention wrong subject to query.

Actually I want to compress mht file in zip and want to send report by script.


SmartBear Alumni (Retired)

Thank you Community!


@kaiiii, could you explain why you need to zip it? You can send the .mht file as far as I understand. 

Please take a look at this article. 

Sonya Mihaljova
Community and Education Specialist

Valued Contributor

Hi kaiii,

I have a test which compress and send by mail a mht file.

Here are the few lines I use (delphi script) :


  Log.SaveResultsAs(ReportFolder + 'Report.mht', 2);
  FileList:= slPacker.GetFileListFromFolder(ReportFolder);
  ArchivePath:= ReportFolder + 'ZippedReport';
  if (slPacker.Pack(FileList, ReportFolder, ArchivePath)) then
    Log.Message('File ziped');
  result:= ArchivePath;  
SmartBear Alumni (Retired)

Thank you m_essaid! This might be the anser kaiiii is looking for.


@kaiiii , does what m_essaid offer work for your case?

Sonya Mihaljova
Community and Education Specialist

Showing results for 
Search instead for 
Did you mean: