You simply have to try the open with the sharing access you would like, and handle the error that is thrown.
Note: Sometimes the file won't open simply because the file sharing rights you specified conflicts with the file sharing rights that someone already opened the file with.
Please see my answer here for more information.