A method that works sometimes is to pound on the sunroof glass with your fist at the rear center where the latch attaches. If the latch isn't too tight, sometimes it will flip open.
If it flips open, then you can get your fingers underneath the edge of the glass and lift it. Insert a long stiff rod through the opening and push the slide latch forward on the door.