Enum DocumentRecoveryMode
Enum DocumentRecoveryMode
Namespace: Aspose.Words.Loading
Assembly: Aspose.Words.dll (25.12.0)
Specifies the available recovery options when a document encounters errors during loading.
public enum DocumentRecoveryModeFields
None = 0
No recovery is attempted.
If the document is invalid, loading will fail with an error.
TryRecover = 1
Attempts to recover the document while preserving as much data as possible.
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);