Hi,
I am using Aspose.Words to read contents from word documents. I am using
below code to open the password protected documents using Aspose.words.
try
{
Document mainDoc = new Document(m_documentFile);
}
catch (Aspose.Words.IncorrectPasswordException)
{
LoadOptions loadOps = new LoadOptions();
loadOps.Password = "Test";
mainDoc = new Document(m_documentFile, loadOps);
}
But my current requirement is to loop the list of passwords provided by the user and try to open the document utile the document opens successfully.
Please provide the sample code for this as soon as possible.
Thanks,
Dhivya
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.