OfficeIMO.Word.Html 1.0.40

Prefix Reserved
dotnet add package OfficeIMO.Word.Html --version 1.0.40
                    
NuGet\Install-Package OfficeIMO.Word.Html -Version 1.0.40
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="OfficeIMO.Word.Html" Version="1.0.40" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OfficeIMO.Word.Html" Version="1.0.40" />
                    
Directory.Packages.props
<PackageReference Include="OfficeIMO.Word.Html" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add OfficeIMO.Word.Html --version 1.0.40
                    
#r "nuget: OfficeIMO.Word.Html, 1.0.40"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package OfficeIMO.Word.Html@1.0.40
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=OfficeIMO.Word.Html&version=1.0.40
                    
Install as a Cake Addin
#tool nuget:?package=OfficeIMO.Word.Html&version=1.0.40
                    
Install as a Cake Tool

OfficeIMO.Word.Html - Word and HTML conversion

nuget version nuget downloads

OfficeIMO.Word.Html converts between HTML and OfficeIMO.Word documents. It is for document-shaped HTML that should become editable Word content, and for Word documents that should be exported as HTML.

Install

dotnet add package OfficeIMO.Word.Html

Quick start

using OfficeIMO.Word;
using OfficeIMO.Word.Html;

WordDocument document = "<h1>Hello</h1><p>Body</p>".LoadFromHtml(new HtmlToWordOptions());

string html = document.ToHtml(new WordToHtmlOptions {
    IncludeDefaultCss = true,
    ExportFootnotes = true,
    ExportEndnotes = true,
    ExportComments = true
});

HTML can also be appended to an existing body, header, or footer with AddHtmlToBody, AddHtmlToHeader, and AddHtmlToFooter.

What it maps

  • HTML headings, paragraphs, inline formatting, links, images, SVG, lists, tables, captions, form controls, notes, headers, footers, and sections into Word content where supported.
  • Word document metadata, paragraph/run styles, lists, tables, images, SVG, footnotes, endnotes, disabled form controls, comments, headers, footers, and optional CSS back to HTML.
  • Stylesheets, inline CSS, local/remote resources, image policies, resource limits, and diagnostics through explicit options.
  • Document language metadata between HTML lang and Word settings.

Import profiles

var safeOptions = HtmlToWordOptions.CreateUntrustedHtmlProfile();
safeOptions.MaxHtmlNodes = 5000;
safeOptions.DiagnosticHandler = diagnostic =>
    Console.WriteLine($"{diagnostic.Code}: {diagnostic.Source}");

WordDocument safeDocument = html.LoadFromHtml(safeOptions);
  • CreateOfficeIMOProfile() keeps the compatibility-oriented defaults.
  • CreateUntrustedHtmlProfile() keeps external document resources offline by default and enables bounded conversion.
  • CreateTrustedDocumentProfile() enables document-provided stylesheet links for known-good HTML while keeping resource validation.

Boundaries

  • Word document modeling belongs in OfficeIMO.Word.
  • HTML-to-Markdown ingestion belongs in OfficeIMO.Markdown.Html.
  • HTML-to-PDF bridge behavior belongs in OfficeIMO.Html.Pdf.
  • Full support matrices and roadmap detail belong in Docs/, not this README.

Deeper docs

Targets and license

  • Targets: netstandard2.0, net8.0, net10.0; net472 is included when building on Windows.
  • License: MIT.
  • Repository: EvotecIT/OfficeIMO
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 is compatible.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on OfficeIMO.Word.Html:

Package Downloads
OfficeIMO.Word.Markdown

Markdown converter for OfficeIMO.Word - Convert Word documents to/from Markdown using OfficeIMO.Markdown

OfficeIMO.Html.Pdf

Bidirectional HTML/PDF converter for OfficeIMO - Thin adapter over OfficeIMO.Markdown.Html, OfficeIMO.Word.Html, and the first-party OfficeIMO.Pdf logical/read/render engines.

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on OfficeIMO.Word.Html:

Repository Stars
EvotecIT/PSWriteOffice
PowerShell Module to create and edit Microsoft Word, Microsoft Excel, and Microsoft PowerPoint documents without having Microsoft Office installed.
Version Downloads Last Updated
1.0.40 224 6/16/2026
1.0.39 332 6/16/2026
1.0.38 416 6/15/2026
1.0.37 533 6/13/2026
1.0.36 526 6/12/2026
1.0.35 432 6/9/2026
1.0.34 549 6/5/2026
1.0.33 544 5/27/2026
1.0.32 488 5/26/2026
1.0.31 403 5/26/2026
1.0.30 486 5/23/2026
1.0.29 426 5/22/2026
1.0.28 406 5/21/2026
1.0.27 392 5/21/2026
1.0.26 423 5/20/2026
1.0.25 407 5/19/2026
1.0.24 390 5/18/2026
1.0.23 644 5/16/2026
1.0.22 375 5/14/2026
1.0.21 589 5/14/2026
Loading failed