How can you open an mht file in SharePoint Online

Zuzuzu 21 Reputation points
2022-04-23T03:37:34.267+00:00

Hello.
Is is possible to open an mht file in a brower that is stored in a document library on SharePoint Online site, rather than it trying to download it.?
I have numerous mht files stored on a document library. I want to reference these documents and have built a HTML webpage. I want to add the hyperlinks to these files in the document library and for them to open as seperate MHT files.
Any recommendations on what to use to do this?

Thanks.

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,215 questions
{count} vote

4 answers

Sort by: Most helpful
  1. Yanli Jiang - MSFT 23,661 Reputation points Microsoft Vendor
    2022-04-25T10:30:25.86+00:00

    Hi @Zuzuzu ,

    Which browser are you using? If it is Edge, Chrome, it’s not supported to directly open mht file stored in the SharePoint Online in the browser, the file needs to be downloaded first.
    IE browser supports opening MHT files directly, you can try to use IE browser.

    Here are my test results:
    MHT file
    196151-1.png

    Open through Edge
    196068-2.png

    When you click “Open”,It will download automatically.

    Open through Chrome
    196161-3.png

    When you click “Open”,It will download automatically.

    Open through IE
    196096-4.png

    When click “Open”, it will open the file.
    196104-5.png

    If you want to use Chrome/Edge, as a workaround, we can add IE tab extension on them https://chrome.google.com/webstore/detail/ie-tab/hehijbfgiekmjfkfjpbkbammjbdenadd?hl=en

    Thanks,
    Yanli Jiang

    ===========================================

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  2. Paul de Jong 716 Reputation points
    2022-04-25T12:39:35.71+00:00

    OOTB this is not possible with modern browsers without downloading the file. There are 3rd party apps that offer this functionality (example). However, this approach can only be justified if the mht functionality is critical and not nice to have.
    Paul

    0 comments No comments

  3. Zuzuzu 21 Reputation points
    2022-05-14T19:09:54.017+00:00

    Thanks all. Unfortunately it's edge browser and its for work so it's controlled by admins. I have decided to save the files as pdfs and by this way I can use the PDF link to go straight to the file.

    0 comments No comments