Export Word to HTML file in C# and VB.NET

GemBox.Document allows you to convert between HTML and Word formats in C# and VB.NET.

The following example shows how to load a Word document and save it, together with all its images, into HTML or MHTML format.

Convert between HTML and Word Screenshot
Upload your file (Drag file here)
using GemBox.Document;

class Program
{
    static void Main(string[] args)
    {
        // If using Professional version, put your serial key below.
        ComponentInfo.SetLicense("FREE-LIMITED-KEY");

        DocumentModel document = DocumentModel.Load("%InputFileName%");

        // Images will be embedded directly in HTML img src attribute.
        document.Save("Html Export.%OutputFileType%", new HtmlSaveOptions() { EmbedImages = true });
    }
}
Imports GemBox.Document

Module Program

    Sub Main()

        ' If using Professional version, put your serial key below.
        ComponentInfo.SetLicense("FREE-LIMITED-KEY")

        Dim document As DocumentModel = DocumentModel.Load("%InputFileName%")

        ' Images will be embedded directly in HTML img src attribute.
        document.Save("Html Export.%OutputFileType%", New HtmlSaveOptions() With {.EmbedImages = True})

    End Sub

End Module

Check next example or download examples from GitHub.