I'd like to intercept the event of opening a file/document stored on a SharePoint site (after a user has clicked on a file) and execute some custom code before synchronously proceeding with normal file opening.
Something like this:
- user clicks on a file on a site,
- call custom code based on the clicked file (e.g. log clicked file information such as name and GUID),
- after custom code has completed, proceed with normal opening (content retrieval) of the file (or retry opening without executing custom code).
Is this possible to do using the SharePoint API? If so, how? All help is appreciated.