Office PowerPoint Password Detection RRS feed

  • Question

  • I've spend about 5 hours today and a few yesterday researching this problem... my head now hurts... ALOT! I've created a program that will iterate through a collection of PowerPoint files (PPT, PPTX) opening the documents in a background thread and checking the slide objects for comments. Everything is working perfectly except when I encounter password encrypted files!!! I have a try block that is detecting corrupt files/problems and reporting the exceptions, however the password protected files just hang on the screen requiring user intervention... I need to eliminate this! After all of my research is seems that the only way to solve this issue with with SendKeys (seems like there should be another way!?). Here is the post recommending such:

    PPT Password SendKeys Solution

    If this is truly the only solution, I could use some help implementing this... I don't have much experience with SendKeys! Thinking it through, I think I would need to detect the PowerPoint password window, set focus on said window, then pass the ALT+R key to the window (I believe that is the keyboard command for open as read-only)... This may not be optimial however as I am unsure if there are documents that will open without this option!? To me it seems as if there is something i'm overlooking and that there should be a way to just reference the properties or some method that I'm not seeing.... Anyway, any help is very very much appreciated!

    Thursday, February 28, 2013 9:09 PM

All replies