Aspose::Words::Loading::DocumentRecoveryMode enum

DocumentRecoveryMode enum

Specifies the available recovery options when a document encounters errors during loading.

enum class DocumentRecoveryMode

Values

NameValueDescription
None0No recovery is attempted. If the document is invalid, loading will fail with an error.
TryRecover1Attempts 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.

auto loadOptions = System::MakeObject<Aspose::Words::Loading::LoadOptions>();
loadOptions->set_RecoveryMode(Aspose::Words::Loading::DocumentRecoveryMode::TryRecover);

auto doc = System::MakeObject<Aspose::Words::Document>(get_MyDir() + u"Corrupted footnotes.docx", loadOptions);

See Also