Aspose::Words::Loading::LoadOptions::get_RecoveryMode method
LoadOptions::get_RecoveryMode method
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.
Aspose::Words::Loading::DocumentRecoveryMode Aspose::Words::Loading::LoadOptions::get_RecoveryMode() const
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
- Enum DocumentRecoveryMode
- Class LoadOptions
- Namespace Aspose::Words::Loading
- Library Aspose.Words for C++