# WordLoadOptions

Controls access, persistence, and package behavior when loading a Word document.

Class 

`OfficeIMO.Word`

**Namespace**

`OfficeIMO.Word`

**Assembly**

`OfficeIMO.Word`

**Source revision**

`273d35d5ba8a` with working tree changes

**Source**

[WordLifecycleOptions.cs:46](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Word/WordLifecycleOptions.cs#L46)

**Base**

`DocumentLoadOptions`

**Modifiers**

sealed

Controls access, persistence, and package behavior when loading a Word document.

## Inheritance

- DocumentLoadOptions
- WordLoadOptions

## Guides & Samples

Authored walkthroughs and practical samples linked to this API.

- [Protect and Encrypt Word Documents](/docs/word/protection/) Guide
  
  Restrict editing of DOCX files to read-only, comments, tracked changes or forms, mark them final, and encrypt or open them with a password in .NET.

## Usage

Explore 3 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Returned or exposed by 1

- Property [WordLoadOptions.UntrustedDefaults](/api/word/officeimo-word-wordloadoptions/#property-untrusteddefaults)

### Accepted by parameters 2

- Method [WordDocument.Load](/api/word/officeimo-word-worddocument/#method-load-string-officeimo-word-wordloadoptions) parameter `options`
- Method [WordDocument.LoadAsync](/api/word/officeimo-word-worddocument/#method-loadasync-string-officeimo-word-wordloadoptions-threading-cancellationtoken) parameter `options`

Filter members 

Show inherited

## Constructors

`public WordLoadOptions()` [#](#constructor-ctor)

[WordLifecycleOptions.cs:46](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Word/WordLifecycleOptions.cs#L46)

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

## Properties

`public static WordLoadOptions UntrustedDefaults { get; }` [#](#property-untrusteddefaults)

[WordLifecycleOptions.cs:39](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Word/WordLifecycleOptions.cs#L39)

Creates bounded options that reject active, embedded, and externally linked package content.

`public long MaxInputBytes { get; set; }` [#](#property-maxinputbytes)

[WordLifecycleOptions.cs:46](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Word/WordLifecycleOptions.cs#L46)

Maximum number of source bytes accepted before Word package parsing begins.

`public bool AllowLegacyProjection { get; set; }` [#](#property-allowlegacyprojection)

[WordLifecycleOptions.cs:49](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Word/WordLifecycleOptions.cs#L49)

Allows native binary DOC projection into an Open XML model. Default: true. False rejects that source family before picture projection, including mislabeled input.

`public bool OverrideStyles { get; set; }` [#](#property-overridestyles)

[WordLifecycleOptions.cs:52](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Word/WordLifecycleOptions.cs#L52)

Replaces existing styles with OfficeIMO defaults when the document is editable.

`public OfficeOpenXmlLoadSettings? OpenSettings { get; set; }` [#](#property-opensettings)

[WordLifecycleOptions.cs:55](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Word/WordLifecycleOptions.cs#L55)

Provides optional low-level Open XML package settings.

`public bool FailOnLoss { get; set; }` [#](#property-failonloss)

[WordLifecycleOptions.Unified.cs:15](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Word/WordLifecycleOptions.Unified.cs#L15)

Rejects reported loss when a native Word source is projected into the editable model.

`public string? Password { get; set; }` [#](#property-password)

[WordLifecycleOptions.Unified.cs:17](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Word/WordLifecycleOptions.Unified.cs#L17)

Password for an encrypted Office source.

`public int MaxLegacyInputBytes { get; set; }` [#](#property-maxlegacyinputbytes)

[WordLifecycleOptions.Unified.cs:19](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Word/WordLifecycleOptions.Unified.cs#L19)

Maximum binary DOC stream size accepted by the native decoder.

`public int MaxDecodedImageBytes { get; set; }` [#](#property-maxdecodedimagebytes)

[WordLifecycleOptions.Unified.cs:21](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Word/WordLifecycleOptions.Unified.cs#L21)

Maximum aggregate decoded legacy image bytes.

`public int MaxDecodedCharacters { get; set; }` [#](#property-maxdecodedcharacters)

[WordLifecycleOptions.Unified.cs:23](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Word/WordLifecycleOptions.Unified.cs#L23)

Maximum legacy text characters decoded from the piece table.

`public int MaxParagraphPropertyWorkBytes { get; set; }` [#](#property-maxparagraphpropertyworkbytes)

[WordLifecycleOptions.Unified.cs:25](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Word/WordLifecycleOptions.Unified.cs#L25)

Maximum legacy paragraph-property traversal work, in bytes.

`public int MaxDataPropertyChainLength { get; set; }` [#](#property-maxdatapropertychainlength)

[WordLifecycleOptions.Unified.cs:27](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Word/WordLifecycleOptions.Unified.cs#L27)

Maximum legacy Data records followed by one paragraph-property chain.

`public bool ReportUnsupportedContent { get; set; }` [#](#property-reportunsupportedcontent)

[WordLifecycleOptions.Unified.cs:29](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Word/WordLifecycleOptions.Unified.cs#L29)

Reports recognized unsupported content during legacy projection.

## Inherited Properties

`public DocumentAccessMode AccessMode { get; set; }` [#](#property-accessmode)

Inherited from DocumentLoadOptions

`public OfficePackageSecurityOptions? PackageSecurity { get; set; }` [#](#property-packagesecurity)

Inherited from DocumentLoadOptions

`public bool CaptureSourcePackageSecurity { get; set; }` [#](#property-capturesourcepackagesecurity)

Inherited from DocumentLoadOptions

`public DocumentPersistenceMode PersistenceMode { get; set; }` [#](#property-persistencemode)

Inherited from DocumentCreateOptions

## Fields

`public const long DefaultMaxInputBytes` [#](#field-defaultmaxinputbytes)

[WordLifecycleOptions.cs:36](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Word/WordLifecycleOptions.cs#L36)

Default maximum complete source size (512 MiB).

Value: `536870912`

<!-- PowerForge markdown artifact sha256:E783552BCB1969BC56C7760897C15B073F39879872322A4684C44C645E7586A0 -->
