Hi,
I am using Aspose.Slides to read contents from PowerPoint document. I am using below code to open the password protected documents using Aspose.Slides.
try
{
PresentationEx presentation = new PresentationEx(m_documentFile);
}
catch (Exception ex)
{
if (ex.Message.Contains("Presentation is encrypted"))
{
LoadOptions loadOps = new LoadOptions();
loadOps.Password = m_passwordList[0] as string;
presentation = new PresentationEx(m_documentFile, loadOps);
}
else
throw ex;
}
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 sccessfully.
Please provide the sample code for this as soon as possible.
Thanks,
Dhivyav