I read this in another forum when I had a sunroof problem... it was in response to an '05 300C sunroof problem and explains how to recalibrate it...
Recalibration Procedure:
1. **UNCALIBRATE THE SUNROOF. a. Insure the battery is at least 12 Volts.
b. Place the ignition switch in RUN position.
c. Locate the sunroof fuse (Fuse 44 in the Power Distribution Center located in the trunk).
d. While the sunroof is still in motion, have an assistant remove the sunroof fuse.
e. Reinstall the sunroof fuse.
2. RECALIBRATE THE SUNROOF a. Press and hold the sunroof vent switch until it stops at the full vent position.
b. Verify sunroof operation by opening, closing, and venting the sunroof.
c. If the uncalibrate/recalibrate procedure corrected the sunroof glass to roof fit, perform the Repair Procedure using the factory scan tool to reprogram the sunroof module.
I hope that is the correct fuse for you. In the same thread, it also had some info on how to manually force it closed after multiple failed attempts...
When three EFL events occur without the glass being allowed to fully close, the next close attempt will only move while the close switch is continuously actuated. This allows the sunroof to be forced closed if multiple close attempts fail. If the sunroof close switch is continuously actuated during an EFL event, through the reversal, and during a two second wait time, then continuing to hold the close switch will cause the roof to move towards close with the EFL protection disabled. This allows the sunroof to be forced closed if it is known that a reversal will occur. While in EFL override, the closing motion will cease if the sunroof switch is released at any time.
Hope this helps!