Windows shell extension [windows file opening event] RRS feed

  • Question

  • Hi

    I have different files in my folder. I need to do some validations while opening a file irrespective of file type and should be able to cancel the operation if the validation failed. So i need to get the file open event from windows [Context menu open / Double click from windows explorer/open from any application like word,excel,autocad etc]. Is it possible using windows shell extension from managed code. [C#..Net 4.0]. How can i achieve this ? Can i get some idea about this ? If possible can i get some sample codes .



    Friday, July 20, 2012 12:19 PM

All replies

  • I believe this would be application specific.  Some applications (Notepad.exe for instance) will simply open the file regardless of the content and not fail.  For Microsoft Office applications, you should be able to use Office APIs to preload the file internally and perform some kind of validation.

    David Downing... If this answers your question, please Mark as the Answer. If this post is helpful, please vote as helpful.

    Friday, July 20, 2012 1:34 PM