如何在WPF应用程序中将.mht文件转换为.docx [英] How to convert .mht file to .docx in a WPF application

查看:90
本文介绍了如何在WPF应用程序中将.mht文件转换为.docx的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

wpf应用程序将在单击按钮时启动问题步骤记录器。 Problem Step Recorder生成一个包含.mht文件的zip文件。我需要将此.mht转换为.docx以便我可以查看测试步骤图像



我尝试了什么:



我没有找到任何代码将.mht转换为.docx

wpf application will launch the Problem Step Recorder on click of a button. Problem Step Recorder generates a zip file which has the .mht file. i need to convert this .mht to .docx so that i can view the test steps images

What I have tried:

I did not find any code to convert .mht to .docx

推荐答案

问题的第一部分是理解MHT文件的格式:什么是MHT?什么打开MHT?来自WhatIs.com的文件格式列表 [ ^ ]



知道它是什么,你有意义的是你不需要转换它,而是在中打开它WebBrowser 改为控制。 WebBrowser 控件使用IE(非边缘)引擎,因此如果您可以在IE中打开MHT文件,那么它将与此控件一起使用。
First part of the problem is understanding what format the MHT file is in: What is MHT? What Opens a MHT? File Format List from WhatIs.com[^]

Knowing what it is, it makes sense that you don't need to convert it but instead open it in the WebBrowser control instead. The WebBrowser control uses the IE (not edge) engine, so if you can open the MHT file in IE, then it will work with this control.


这篇关于如何在WPF应用程序中将.mht文件转换为.docx的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆