VintaSoft Imaging .NET SDK 15.1: Documentation for .NET developer
Vintasoft.Imaging.Office.OpenXml Namespace / OpenXmlDocumentConverter Class / ConvertDocxToHtml Methods / ConvertDocxToHtml(String,String) Method
Syntax Exceptions Example Requirements SeeAlso
In This Topic
ConvertDocxToHtml(String,String) Method (OpenXmlDocumentConverter)
In This Topic
Converts a DOCX document to a HTML document.
Syntax
'Declaration

Public Overloads Shared Sub ConvertDocxToHtml( _
ByVal docxFilename
The filename of input DOCX document.
As System.String, _
ByVal htmlFilename
The filename of output HTML document.
As System.String _
)
public static void ConvertDocxToHtml(
System.String docxFilename,
System.String htmlFilename
)

Parameters

docxFilename
The filename of input DOCX document.
htmlFilename
The filename of output HTML document.
Exceptions
ExceptionDescription
Thrown if docxFilename or htmlFilename is null.
Example

This C#/VB.NET code shows how to convert DOCX document to a HTML document.


''' <summary>
''' Converts DOCX file to a HTML file.
''' </summary>
''' <param name="docxFilePath">Path to a source DOC file.</param>
''' <param name="htmlFilePath">Path to a result HTML file.</param>
Public Shared Sub ConvertDocxToHtml(docxFilePath As String, htmlFilePath As String)
    Vintasoft.Imaging.Office.OpenXml.OpenXmlDocumentConverter.ConvertDocxToHtml(docxFilePath, htmlFilePath)
End Sub


/// <summary>
/// Converts DOCX file to a HTML file.
/// </summary>
/// <param name="docxFilePath">Path to a source DOC file.</param>
/// <param name="htmlFilePath">Path to a result HTML file.</param>
public static void ConvertDocxToHtml(string docxFilePath, string htmlFilePath)
{
    Vintasoft.Imaging.Office.OpenXml.OpenXmlDocumentConverter.ConvertDocxToHtml(docxFilePath, htmlFilePath);
}

Requirements

Target Platforms: .NET 10; .NET 9; .NET 8; .NET 7; .NET 6; .NET Framework 4.8, 4.7, 4.6, 4.5, 4.0, 3.5

See Also