Imports Docs.Word


Module Module1
	Sub Main()
		'	Define names of source and result files
		'	Change the extension of result file if you change the output format
		Dim SourceFileName As String = "TestFile.html"
		Dim OutputFileName As String = "ResultFile.docx"

		'	Change convert options
		Converter.Options.PageHeight = 700
		Converter.Options.PageWidth = 300
		Converter.Options.LeftMargin = 50
		Converter.Options.RightMargin = 30

		'	Convert from HTML to DOCX (you can change output format)
		Converter.ConvertHtmlToDoc(SourceFileName, OutputFileName, DocumentFormat.DOCX)

		'	Open result file
		Process.Start(OutputFileName)
	End Sub
End Module
