RecoveryMode

LoadOptions.RecoveryMode property

Defines how the document should be handled if errors occur during loading. Use this property to specify whether the system should attempt to recover the document or follow another defined behavior. The default value is TryRecover.

public DocumentRecoveryMode RecoveryMode { get; set; }

Examples

Shows how to try to recover a document if errors occurred during loading.

LoadOptions loadOptions = new LoadOptions();
loadOptions.RecoveryMode = DocumentRecoveryMode.TryRecover;

Document doc = new Document(MyDir + "Corrupted footnotes.docx", loadOptions);

See Also