Word .NET > Tutorial > Export Word document to HTML

The following example shows you how to export a Word document to HTML format. The SaveAsHtml method preserves text formatting, paragraphs, tables, hyperlinks, images, colors, and other document elements.

C# example
VB example

Features supported in HTML export:

  • Text content with formatting (bold, italic, underline, strikethrough)
  • Font properties (family, size, color)
  • Paragraph alignment and indentation
  • Text highlighting and background colors
  • Tables with borders and cell formatting
  • Hyperlinks with URLs and tooltips
  • Lists (numbered and bulleted)
  • Images (as placeholders)
  • Tabs and line breaks
  • Superscript and subscript

Need help? Ask our developers: