Load Convert Encrypted Word Documents DOCX Files to PDF using Aspose.Words for C++

Hello Aspose word support team,

Using Aspose word C++ 18.11, I tried to open encrypted document but it crash. I use the sample file TestDocEnc.zip (13.7 KB) TestDocEnc.docx

I use the below code to decrypt the document.

auto loadOption = System::MakeObject<Aspose::Words::LoadOptions>(Aspose::Words::LoadFormat::Docx, "123", NullStr);
auto doc = System::MakeObject<Aspose::Words::Document>("TestDocEnc.docx");
auto builder = System::MakeObject<Aspose::Words::DocumentBuilder>(doc);

Also, I would like to know how can we decrypt an encrypted word document? Could you provide me a sample code to do so?


Thanks for your inquiry. Please pass the LoadOptions object to Document’s constructor. We suggest you please check the code from Aspose.Words for C++ examples repository at GitHub. Hope this helps you.


We have tested the scenario and have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WORDSCPP-737. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.


The issues you have found earlier (filed as WORDSCPP-737) have been fixed in this Aspose.Words for C++ 20.2 update.