VintaSoft Imaging .NET SDK 14.1: Documentation for .NET developer
Vintasoft.Imaging.Office.OpenXml Namespace / OpenXmlDocumentConverter Class / ConvertHtmlToDocx Methods / ConvertHtmlToDocx(String,String) Method
Syntax Example Requirements SeeAlso
In This Topic
    ConvertHtmlToDocx(String,String) Method (OpenXmlDocumentConverter)
    In This Topic
    Converts a HTML document to a DOCX document.
    Syntax
    'Declaration
    
    Public Overloads Shared Sub ConvertHtmlToDocx( _
    ByVal htmlFilename
    The filename of input HTML document.
    As System.String, _
    ByVal docxFilename
    The filename of output DOCX document.
    As System.String _
    )
    public static void ConvertHtmlToDocx(
    System.String htmlFilename,
    System.String docxFilename
    )
    public: static void ConvertHtmlToDocx(
    System.String htmlFilename,
    System.String docxFilename
    )
    public:
    static void ConvertHtmlToDocx(
    System.String htmlFilename,
    System.String docxFilename
    )

    Parameters

    htmlFilename
    The filename of input HTML document.
    docxFilename
    The filename of output DOCX document.
    Example

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

    
    ''' <summary>
    ''' Converts HTML document to a DOCX document.
    ''' </summary>
    ''' <param name="htmlFilePath">Path to a source HTML file.</param>
    ''' <param name="docxFilePath">Path to a result DOCX file.</param>
    Public Shared Sub ConvertHtmlToDocx(htmlFilePath As String, docxFilePath As String)
        Vintasoft.Imaging.Office.OpenXml.OpenXmlDocumentConverter.ConvertHtmlToDocx(htmlFilePath, docxFilePath)
    End Sub
    
    
    
    /// <summary>
    /// Converts HTML document to a DOCX document.
    /// </summary>
    /// <param name="htmlFilePath">Path to a source HTML file.</param>
    /// <param name="docxFilePath">Path to a result DOCX file.</param>
    public static void ConvertHtmlToDocx(string htmlFilePath, string docxFilePath)
    {
        Vintasoft.Imaging.Office.OpenXml.OpenXmlDocumentConverter.ConvertHtmlToDocx(htmlFilePath, docxFilePath);
    }
    
    

    Requirements

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

    See Also