OfficeIMO.Reader.Word 3.6.1

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

OfficeIMO.Reader.Word

Word ingestion for OfficeIMO.Reader.Core with DOCX, DOCM, and legacy DOC support.

Project an open document

Import OfficeIMO.Reader.Word and call document.ReadDocument(sourceName, options, formatOptions, cancellationToken) on a caller-owned WordDocument. The method uses the same Reader projection as path and stream reads, snapshots both option sets and enforces the projection's output budgets. Full is the default. The model remains open for subsequent InspectEmbeddedPayloads reads.

The source name supplies citations without reopening a file or inventing its byte hash, length or timestamp. Input and package admission settings cannot retroactively constrain the earlier native load; configure them when loading the model. Lean projection still requires a modern XML source model.

Text and metadata projection

Use ReaderOptions.Projection = ReaderProjection.TextAndMetadata for DOCX, DOCM, DOTX and DOTM inspection when image bytes, computed page layout and Markdown are not requested. The adapter retains semantic text, tables, links and requested native inspection metadata. It omits image payload copies before snapshot and asset construction, skips Markdown rendering, and leaves computed pages absent. This projection does not infer physical pages for flow text.

With Inspection.IncludePackageContent, lean reads inventory inert payload descriptors through a bounded native session. Sizes unavailable without reading remain explicitly unknown. VBA part/signature-relationship metadata is retained, while module decoding is marked module-payload-unrequested.

Binary DOC/DOT and the separate legacy word-processing handlers require the ordinary Full projection. They refuse TextAndMetadata rather than silently render graphics or construct a full import. Native routing also rejects a binary source mislabeled with a modern extension. Native parser limits remain separate from Reader's aggregate result budgets.

OpenXmlMaxPartUncompressedBytes and OpenXmlMaxTotalUncompressedBytes apply native declared part/aggregate expansion admission before model loading, even when Inspection is null. Configured ceilings produce terminal ReaderResourceLimitException with the native failure retained; they are not retried as password failures. These are package admission bounds, not a hard limit on process memory or every decoder's actual work.

Rich list-item blocks carry the resolved Word marker in OfficeDocumentBlock.Marker, including authored starts, Roman or lettered formats, continuation, and explicit restarts. Portable bullet symbols are retained, and invisible list markers are empty. The values come from WordParagraphInfo.ListMarker; inspection snapshots also expose the numeric counter of an ordered item through WordParagraphInfo.ListIndex. Inspection and ingestion reject list markers longer than 4,096 characters or more than 4,194,304 generated marker characters in a document with an InvalidDataException.

using OfficeIMO.Reader;
using OfficeIMO.Reader.Word;

OfficeDocumentReader reader = new OfficeDocumentReaderBuilder()
    .AddWordHandler()
    .Build();

To add best-effort page locations for search and citations:

using OfficeIMO.Reader;
using OfficeIMO.Reader.Word;

OfficeDocumentReader reader = new OfficeDocumentReaderBuilder()
    .AddWordHandler(new ReaderWordOptions {
        IncludePageLocations = true
    })
    .Build();

OfficeDocumentReadResult document = reader.ReadDocument("policy.docx");
OfficeDocumentSearchResult matches = document.Search("retention period");

foreach (int page in matches.PageNumbers) {
    Console.WriteLine($"Found on page {page} of {matches.TotalPageCount}");
}

Word does not store stable physical pages. Enabling IncludePageLocations uses the same OfficeIMO.Word page layout as PDF and image export and reports OfficeDocumentPageProvenance.Computed. PageLocationOptions.LayoutOptions configures that layout. The normalized Blocks and Pages contain visible rendered text lines with page-specific identities and baseline extents in PDF user-space points. Logical text remains available through Chunks; tables and links remain at document scope because rendered lines do not identify their authored source blocks. Page Markdown therefore follows rendered text rather than authored paragraph or list structure. Results can differ from Microsoft Word when fonts, metrics, or unsupported layout features differ, so the option is disabled by default.

Selected WordPerfect, WordStar, Ami Pro, Lotus Word Pro, Works/Write, and Word for DOS sources are included in OfficeIMO.Word but remain opt-in at the Reader registration boundary:

using OfficeIMO;
using OfficeIMO.Reader;
using OfficeIMO.Reader.Word;
using OfficeIMO.Word.Legacy;

OfficeDocumentReader reader = new OfficeDocumentReaderBuilder()
    .AddWordAndLegacyHandlers(new LegacyWordImportOptions {
        Limits = new OfficeLegacyImportLimits { MaxInputBytes = 64 * 1024 * 1024 }
    })
    .Build();

OfficeDocumentReadResult document = reader.ReadDocument("archive.wpd");

The combined registration applies the same immutable legacy options to both the family-specific extensions and content-routed Word for DOS .doc; compound-binary .doc remains on the normal Word path. AddLegacyWordHandler(...) remains available when only the unambiguous legacy extensions are wanted and deliberately does not claim .doc.

Legacy warnings include the detected profile, structured-versus-salvage quality, and feature-level losses. The handler never executes source macros or embedded code.

Inspect comments and tracked changes

Use a rich read to retain native review and package evidence:

using OfficeIMO.Reader;
using OfficeIMO.Reader.Word;

var reader = new OfficeDocumentReaderBuilder().AddWordHandler().Build();
OfficeDocumentReadResult document = reader.ReadDocument("review.docx", new ReaderOptions {
    Inspection = new ReaderInspectionOptions()
});
foreach (OfficeDocumentMetadataEntry entry in document.Metadata) {
    if (entry.Category == OfficeDocumentInspectionCategories.Comment ||
        entry.Category == OfficeDocumentInspectionCategories.Revision)
        Console.WriteLine($"{entry.Category}: {entry.Value} ({entry.SourceObjectId})");
}

Comment records retain available authors, dates, reply/resolution state, target text and story identifiers. Revision records retain affected text, source part and story; inspection does not accept or reject changes. Unsupported review metadata remains explicit in coverage and diagnostics. Visibility observations use the content-safety owner; requesting visibility while disabling content safety does not infer hidden state from the extracted text.

Package inspection reads the loader's source bytes and retains inert payload/VBA descriptors. Loaded-content safety inspection does not reopen or serialize the document. Reader Core defines the shared record/character ceilings and terminal resource failures.

Targets and dependencies

  • Targets: netstandard2.0, net8.0, net10.0, and net472 on Windows.
  • OfficeIMO dependencies: OfficeIMO.Reader.Core, OfficeIMO.Word, and OfficeIMO.Core.
  • License: MIT.
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.Reader.Word:

Package Downloads
OfficeIMO.Reader.All

Composition-only preset for registering OfficeIMO.Reader's local format adapters.

FileInspectorX.OfficeIMO

Optional bounded OfficeIMO document, image metadata and passive archive adapter for FileInspectorX.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.6.1 161 11/10/2026
3.6.0 337 11/6/2026
3.5.3 204 10/31/2026
3.5.2 248 10/24/2026
3.5.1 529 10/16/2026
3.4.5 707 10/10/2026
3.4.4 699 9/27/2026
3.4.3 486 9/12/2026
3.4.2 254 9/9/2026
3.4.1 267 9/7/2026
3.4.0 210 9/6/2026
3.3.0 248 9/2/2026
3.2.7 424 8/29/2026
3.2.6 572 8/22/2026
3.2.5 273 8/21/2026
3.2.4 268 8/19/2026
3.2.3 197 8/17/2026
3.2.2 398 8/13/2026
3.2.1 313 8/11/2026
3.2.0 479 8/7/2026
Loading failed