OfficeIMO.Word 3.6.0

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package OfficeIMO.Word --version 3.6.0
                    
NuGet\Install-Package OfficeIMO.Word -Version 3.6.0
                    
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" Version="3.6.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OfficeIMO.Word" Version="3.6.0" />
                    
Directory.Packages.props
<PackageReference Include="OfficeIMO.Word" />
                    
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 --version 3.6.0
                    
#r "nuget: OfficeIMO.Word, 3.6.0"
                    
#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@3.6.0
                    
#: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&version=3.6.0
                    
Install as a Cake Addin
#tool nuget:?package=OfficeIMO.Word&version=3.6.0
                    
Install as a Cake Tool

OfficeIMO.Word

nuget version nuget downloads

Create, edit, read and save Word documents (.docx, and the supported subset of Word 97–2003 .doc) in .NET, without Microsoft Word or COM. New documents use the Modern theme for headings, body text, tables and charts.

Install

dotnet add package OfficeIMO.Word

Add an adapter only for the conversions you need:

dotnet add package OfficeIMO.Word.Pdf        # SaveAsPdf, page images
dotnet add package OfficeIMO.Word.Markdown   # ToMarkdown, Markdown to Word
dotnet add package OfficeIMO.Word.Html       # ToHtml, SaveAsHtml

Targets netstandard2.0, net8.0 and net10.0, plus net472 on Windows.

Create a report

using OfficeIMO;
using OfficeIMO.Word;

Milestone[] milestones = [new("Discovery", "Product", "Done"), new("Pilot", "Operations", "At risk"), new("Rollout", "IT", "Planned")];

using var document = WordDocument.Create("Status.docx");
document.AddHeading("Northwind migration", level: 1);

WordParagraph status = document.AddParagraph("Overall status: ");
status.AddText("On track").Bold = true;

document.AddHeading("Milestones", level: 2);
document.AddTable(milestones);

document.Save();

record Milestone(string Name, string Owner, string Status);

AddTable takes any IEnumerable<T>: columns come from public properties, the header row repeats on every page and numbers are right-aligned. OfficeTableOptions picks, orders and renames columns:

using OfficeIMO;
using OfficeIMO.Word;

Milestone[] milestones = [new("Discovery", "Product", "Done"), new("Pilot", "Operations", "At risk")];

using var document = WordDocument.Create("Milestones.docx");
var options = new OfficeTableOptions { Name = "Milestones" };
options.Order.AddRange(["Status", "Name"]);
options.Exclude.Add("Owner");
options.HeaderRenames["Name"] = "Milestone";
document.AddTable(milestones, options);
document.Save();

record Milestone(string Name, string Owner, string Status);

Charts

Charts are native, editable Word charts with their data in an embedded workbook. Name the category and value properties, or pass selectors with OfficeSeries:

using OfficeIMO;
using OfficeIMO.Word;

Week[] trend = [new("W1", 20, 18), new("W2", 45, 40), new("W3", 70, 66), new("W4", 92, 85)];

using var document = WordDocument.Create("Trend.docx");
document.AddHeading("Completion by week", level: 1);
document.AddChart(OfficeChartType.Line, trend, nameof(Week.Label), nameof(Week.Planned), nameof(Week.Complete));
document.AddChart(OfficeChartType.Column, trend, t => t.Label,
    new OfficeChartOptions { Title = "Complete (%)", Width = OfficeLength.Centimeters(14) },
    OfficeSeries.From(trend, t => t.Complete, "Complete"));
document.Save();

record Week(string Label, int Planned, int Complete);

Headers, footers and images

using OfficeIMO;
using OfficeIMO.Word;

using var document = WordDocument.Create("Letter.docx");
document.PageSetup.Header.AddParagraph("Northwind Traders");
document.PageSetup.Footer.AddParagraph("Page ").AddPageNumber(includeTotalPages: true);

document.AddImage("logo.png", width: OfficeLength.Centimeters(4));
document.AddParagraph("Dear customer,");
document.Save();

Edit an existing document

using OfficeIMO.Word;

using var document = WordDocument.Load("Status.docx");
int replaced = document.ReplaceAll("Northwind", "Contoso");
document.AddParagraph($"Updated on {DateTime.Today:d}; {replaced} replacements.");
document.Save("Status-updated.docx");

Find and ReplaceAll match ordinally and ignore case by default; pass new OfficeTextSearchOptions { MatchCase = true } or WholeWords = true to change that. Find returns a WordSearchResult with the matching paragraphs per document part and the match count, for both literal text and a Regex.

Save() writes to the path the document was created or loaded with; Save(path) writes a copy and keeps working on it. For files from outside your organization, load with WordLoadOptions.UntrustedDefaults, which rejects macros, embedded objects, ActiveX and external relationships before parsing.

Convert

Conversions are called on the document and return an OfficeConversionReport that lists anything the target could not carry:

using OfficeIMO;
using OfficeIMO.Markdown;
using OfficeIMO.Word;
using OfficeIMO.Word.Html;
using OfficeIMO.Word.Markdown;
using OfficeIMO.Word.Pdf;

using var document = WordDocument.Load("Status.docx");

OfficeConversionReport pdf = document.SaveAsPdf("Status.pdf");
if (pdf.HasLoss) {
    foreach (OfficeDiagnostic diagnostic in pdf.Diagnostics) Console.WriteLine($"{diagnostic.Code}: {diagnostic.Message}");
}

document.SaveAsHtml("Status.html");
MarkdownDocument markdown = document.ToMarkdown();
File.WriteAllText("Status.md", markdown.ToMarkdown());

using WordDocument fromMarkdown = MarkdownDocument.Parse("# Notes\n\n- First\n- Second").ToWord();
fromMarkdown.Save("Notes.docx");

More

Dependencies: the Open XML SDK and OfficeIMO.Core. Install OfficeIMO.Security only to create or validate document and VBA signatures. MIT licensed.

Generated capability summary

This table is generated from the package-neutral OfficeIMO operation catalog. The detailed source contracts remain authoritative for feature-level behavior and limitations.

Operation Supported Partial Preserved Rejected Unsupported Not applicable
Create 14 12 0 8 2 2
Read 24 0 9 0 2 3
Edit 12 0 22 3 0 1
Preserve 11 0 22 0 0 1
Inspect 5 1 0 0 0 0
Validate 4 0 0 0 0 2
Remove 4 0 0 0 1 0
Convert 31 27 0 8 0 1

The complete rows for OfficeIMO.Word are published in the generated operation contract.

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 (17)

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

Package Downloads
OfficeIMO.Word.Pdf

PDF converter for OfficeIMO.Word - Export Word documents to PDF using the first-party OfficeIMO.Pdf engine.

OfficeIMO.Word.Html

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

OfficeIMO.Word.Markdown

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

Ank.DocToolkit

Convert HTML to PDF and DOCX in C# without a browser - pure managed, no Chromium, no wkhtmltopdf, no native binaries, no LibreOffice, no Office interop. Also converts Markdown to DOCX and PDF; renders DOCX, XLSX and PPTX to PDF; exports DOCX to HTML/Markdown and XLSX to CSV/HTML; reads legacy Word 97-2003 .doc files; reads text out of a PDF; creates/edits DOCX, XLSX and PPTX; password-protects PDF, DOCX, XLSX and PPTX; and inspects and validates digital signatures in DOCX, XLSX and PPTX. Runs on Linux, Windows, macOS and arm64, and makes no network calls at runtime.

OfficeIMO.ChartForgeX

Optional typed bridge from ChartForgeX visual artifacts to OfficeIMO Word, Excel, PowerPoint, PDF, drawing, and editable Visio surfaces.

GitHub repositories (1)

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

Repository Stars
EvotecIT/PSWriteOffice
Moved to OfficeIMO. Development, releases, issues and pull requests: https://github.com/EvotecIT/OfficeIMO
Version Downloads Last Updated
3.6.2 265 11/18/2026
3.6.1 2,312 11/10/2026
3.6.0 1,222 11/6/2026
3.5.3 2,626 10/31/2026
3.5.2 4,153 10/24/2026
3.5.1 4,063 10/16/2026
3.4.5 2,409 10/10/2026
3.4.4 15,875 9/27/2026
3.4.3 5,748 9/12/2026
3.4.2 1,048 9/9/2026
3.4.1 812 9/7/2026
3.4.0 824 9/6/2026
3.3.0 807 9/2/2026
3.2.7 1,194 8/29/2026
3.2.6 7,394 8/22/2026
3.2.5 672 8/21/2026
3.2.4 832 8/19/2026
3.2.3 1,159 8/17/2026
3.2.2 4,058 8/13/2026
3.2.1 774 8/11/2026
Loading failed