I've got a 1983 240D sedan with electric sunroof. I've cleaned/lubed slides and cable. Sunroof goes all the way back without cable attached (by hand) but only 2/3rds back with cable attached. Could someone have put in a wagon cable? Are there different lengths between sedan and wagon cables? The reason I ask is that there's a wagon fuel sender in the tank so maybe PO had an old wagon and used parts for this sedan. Or is there something else stopping the travel?
Different cables there are
There are two different cable lengths for sedans and of course a shorter length in the coupe. The wagons used a manually operated sunroof. If the cable were too short the roof would not close all the way. It is possible you might have a longer cable from a earlier 123 sedan - but you could also have a slipped clutch in the drive motor that is keeping the roof from opening all the way. Do you have my sunroof manual to refer to? If so tighten the clutch and see what happens.