Quantcast
Channel: General Office Development forum
Viewing all articles
Browse latest Browse all 2257

Detecting password protected PPT (97-2003) documents

$
0
0

Hi,

I have a requirement where without opening a document we have to detect if it is password protected. I found some solution that can take care of word and excel files (Skipping password protected document in batch process - https://wordmvp.com/FAQs/MacrosVBA/CheckIfPWProtectB4Open.htm). Unfortunately this does not work with PPT. 

There are other suggestion available at (stackoverflow - https://stackoverflow.com/questions/5778074/detecting-a-password-protected-document). Seems to work with most of documents but it failed for some PPTs. Basically it relies on scanning for the magic number - 0xF3D1C4DF which if present at a particular location in the header/footer of file then that is protected (for ppt 97-2003).

Is there a standard way we can detect this pragmatically - with or without opening it. As the stackoverflow logic fails for some ppt so i am skeptical if at later stage it will fail for more. Please suggest if there is any standard approach i can follow.

Thanks.      

 

Viewing all articles
Browse latest Browse all 2257

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>