OfficeIMO.Word
1.0.71
Prefix Reserved
See the version list below for details.
dotnet add package OfficeIMO.Word --version 1.0.71
NuGet\Install-Package OfficeIMO.Word -Version 1.0.71
<PackageReference Include="OfficeIMO.Word" Version="1.0.71" />
<PackageVersion Include="OfficeIMO.Word" Version="1.0.71" />
<PackageReference Include="OfficeIMO.Word" />
paket add OfficeIMO.Word --version 1.0.71
#r "nuget: OfficeIMO.Word, 1.0.71"
#:package OfficeIMO.Word@1.0.71
#addin nuget:?package=OfficeIMO.Word&version=1.0.71
#tool nuget:?package=OfficeIMO.Word&version=1.0.71
OfficeIMO.Word - Word documents for .NET
OfficeIMO.Word is the main Word document package in the OfficeIMO family. It creates, edits, inspects, and saves .docx files without COM automation and without Microsoft Office installed.
If OfficeIMO saves you time, please consider supporting the work through GitHub Sponsors or PayPal. PowerShell users should use PSWriteOffice for the PowerShell-facing experience.
Install
dotnet add package OfficeIMO.Word
Quick start
using OfficeIMO.Word;
using var document = WordDocument.Create("report.docx");
document.AddParagraph("Quarterly report").Style = WordParagraphStyles.Heading1;
document.AddParagraph("Created with OfficeIMO.Word.");
var table = document.AddTable(2, 2, WordTableStyle.TableGrid);
table.Rows[0].Cells[0].Paragraphs[0].Text = "Area";
table.Rows[0].Cells[1].Paragraphs[0].Text = "Status";
table.Rows[1].Cells[0].Paragraphs[0].Text = "Documents";
table.Rows[1].Cells[1].Paragraphs[0].Text = "Generated";
table.RepeatHeaderRowAtTheTopOfEachPage = true;
table.Style = WordTableStyle.TableGrid;
document.Save();
What it does
- Creates, loads, edits, saves, and appends
.docxdocuments. - Works with paragraphs, runs, styles, sections, headers, footers, page numbers, tables, images, hyperlinks, bookmarks, fields, footnotes, endnotes, content controls, charts, shapes, and document protection.
- Keeps Office automation out of the runtime path, making it suitable for services, scheduled jobs, CI, desktop apps, and automation hosts.
- Provides fluent helpers for common authoring flows while keeping the lower-level Word object model available.
- Uses
OfficeIMO.Drawingfor shared color and image metadata support.
Examples
The quick start shows the smallest useful document. These examples show the kinds of document work that belong in OfficeIMO.Word itself.
Paragraphs and runs
var paragraph = document.AddParagraph("Status: ");
paragraph.AddText("Approved").Bold = true;
paragraph.AddText(" on ");
paragraph.AddText(DateTime.Today.ToString("yyyy-MM-dd")).Italic = true;
Tables with structure
var table = document.AddTable(3, 3);
table.Rows[0].Cells[0].Paragraphs[0].Text = "Area";
table.Rows[0].Cells[1].Paragraphs[0].Text = "Owner";
table.Rows[0].Cells[2].Paragraphs[0].Text = "Status";
table.RepeatHeaderRowAtTheTopOfEachPage = true;
table.Style = WordTableStyle.TableGrid;
table.Rows[1].Cells[0].Paragraphs[0].Text = "Documents";
table.Rows[1].Cells[1].Paragraphs[0].Text = "Operations";
table.Rows[1].Cells[2].Paragraphs[0].Text = "Ready";
table.MergeCells(rowIndex: 2, columnIndex: 0, rowSpan: 1, colSpan: 3);
table.Rows[2].Cells[0].Paragraphs[0].Text = "Generated by OfficeIMO.Word";
Headers and footers
document.HeaderDefaultOrCreate.AddParagraph("Internal report");
document.FooterDefaultOrCreate.AddParagraph()
.AddText("Page ")
.AddPageNumber();
Images
var paragraph = document.AddParagraph();
paragraph.AddImage("logo.png", width: 160, height: 64);
Hyperlinks and bookmarks
document.AddParagraph("Jump target").AddBookmark("target-section");
document.AddParagraph()
.AddHyperLink("Open project site", new Uri("https://github.com/EvotecIT/OfficeIMO"));
document.AddParagraph()
.AddHyperLink("Jump inside document", "target-section", addStyle: true);
Fields and table of contents
document.AddParagraph("Chapter 1").Style = WordParagraphStyles.Heading1;
document.AddParagraph("Section 1.1").Style = WordParagraphStyles.Heading2;
document.Paragraphs[0].AddField(WordFieldType.TOC);
Mail merge fields
var merge = document.AddParagraph();
merge.AddText("Customer: ");
merge.AddField(new WordFieldBuilder(WordFieldType.MergeField)
.AddInstruction("CustomerName"));
var totalField = new WordFieldBuilder(WordFieldType.MergeField)
.AddInstruction("OrderTotal")
.SetFormat(WordFieldFormat.Numeric);
merge.AddField(totalField);
Content controls
document.FillContentControlValues(new Dictionary<string, object?> {
["Name"] = "Ada Lovelace",
["Approved"] = true,
["DueDate"] = DateTime.Today
});
Dictionary<string, object?> values = document.ExtractContentControlValues();
document.ValidateContentControlValues(values).EnsureValid();
Protection
using DocumentFormat.OpenXml.Wordprocessing;
document.Settings.ProtectionPassword = "owner-password";
document.Settings.ProtectionType = DocumentProtectionValues.ReadOnly;
Convert with adjacent packages
using OfficeIMO.Word.Html;
using OfficeIMO.Word.Markdown;
using OfficeIMO.Word.Pdf;
string html = document.ToHtml(new WordToHtmlOptions { IncludeDefaultCss = true });
string markdown = document.ToMarkdown(new WordToMarkdownOptions());
document.SaveAsPdf("report.pdf");
Adjacent packages
OfficeIMO.Word owns the Word model. Conversion and export packages stay separate so consumers only take the dependencies they need:
| Package | Use it for |
|---|---|
| OfficeIMO.Word.Html | Word to/from HTML conversion. |
| OfficeIMO.Word.Markdown | Word to/from Markdown conversion. |
| OfficeIMO.Word.Pdf | Word to PDF export through OfficeIMO.Pdf. |
| OfficeIMO.Word.GoogleDocs | Planning and exporting Word content to Google Docs. |
Boundaries
- PowerShell examples and cmdlets belong in PSWriteOffice, not this package README.
- Long capability inventories and roadmap notes belong in focused docs under
Docs/. - PDF layout behavior belongs in
OfficeIMO.Word.PdfandOfficeIMO.Pdf.
Targets and license
- Targets:
netstandard2.0,net8.0,net10.0;net472is included when building on Windows. - License: MIT.
- Repository: EvotecIT/OfficeIMO
Runnable samples live under OfficeIMO.Examples/Word.
| Product | Versions 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. |
-
.NETFramework 4.7.2
- DocumentFormat.OpenXml (>= 3.5.1 && < 4.0.0)
- OfficeIMO.Drawing (>= 1.0.24)
-
.NETStandard 2.0
- DocumentFormat.OpenXml (>= 3.5.1 && < 4.0.0)
- OfficeIMO.Drawing (>= 1.0.24)
-
net10.0
- DocumentFormat.OpenXml (>= 3.5.1 && < 4.0.0)
- OfficeIMO.Drawing (>= 1.0.24)
-
net8.0
- DocumentFormat.OpenXml (>= 3.5.1 && < 4.0.0)
- OfficeIMO.Drawing (>= 1.0.24)
NuGet packages (11)
Showing the top 5 NuGet packages that depend on OfficeIMO.Word:
| Package | Downloads |
|---|---|
|
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 |
|
|
OfficeIMO.Reader
Unified, read-only document extraction facade for OfficeIMO (Word/Excel/PowerPoint/Markdown/PDF) intended for AI ingestion. |
|
|
OfficeIMO.Word.Pdf
PDF converter for OfficeIMO.Word - Export Word documents to PDF using the first-party OfficeIMO.Pdf engine. |
|
|
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; and password-protects PDF, DOCX, XLSX and PPTX. Runs on Linux, Windows, macOS and arm64, and makes no network calls at runtime. |
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on OfficeIMO.Word:
| Repository | Stars |
|---|---|
|
EvotecIT/PSWriteOffice
MIT-licensed PowerShell document automation for Word, Excel, PowerPoint, PDF, email, PST/OST, OneNote, Visio, OpenDocument, and mixed-format Reader workflows.
|
| Version | Downloads | Last Updated |
|---|---|---|
| 3.2.6 | 747 | 8/22/2026 |
| 3.2.5 | 479 | 8/21/2026 |
| 3.2.4 | 692 | 8/19/2026 |
| 3.2.3 | 635 | 8/17/2026 |
| 3.2.2 | 3,260 | 8/13/2026 |
| 3.2.1 | 661 | 8/11/2026 |
| 3.2.0 | 6,046 | 8/7/2026 |
| 3.1.1 | 685 | 8/7/2026 |
| 3.1.0 | 1,706 | 8/6/2026 |
| 3.0.3 | 10,701 | 7/27/2026 |
| 3.0.2 | 505 | 7/26/2026 |
| 3.0.1 | 761 | 7/26/2026 |
| 3.0.0 | 5,112 | 7/20/2026 |
| 2.0.1 | 3,223 | 7/14/2026 |
| 2.0.0 | 1,071 | 7/14/2026 |
| 1.0.77 | 2,417 | 7/9/2026 |
| 1.0.76 | 1,112 | 7/8/2026 |
| 1.0.75 | 148 | 7/8/2026 |
| 1.0.74 | 1,538 | 7/5/2026 |
| 1.0.71 | 940 | 6/27/2026 |