I have tried to do something using a WebQueryOpen event but it is impossible to stop opening the document or redirect the user another URL.
You can't control that, as it is part of the view applet internal design. But when a user is seeing documents in a view they are not allowed to open, than there is something wrong with your security design. Why do you want to show the document at all, if you don't want them to open it? It is better to hide the document totally by using the Readers & Author fields at the document level.