Its a bloody nightmare, Wind the roof back a bit, then pull the sunroof lining down from the front, it should unclip, then you should be able to slide the lining backwards into the roof and out of the way. Then you should see the bolts that attach the roof to the winding mechanism, undo them and hey presto you can remove the sunroof. Be very
careful not to scratch the paint when you lift it out. What ever you do don't mess about with the mechanism itself or try to remove it, because if you do you'll be there for 3 hours trying to remember how it came apart and be thinking to yourself why the hell did I touch that!!!
Been there done that!

Good luck!