It will NOT be necessary to remove the fan to access the crankshaft bolt on a 240D. You will need a 27MM deep socket or 27MM socket and very short extension. Don't turn the engine with the power steering pulley causing excess strain on the belt.
If it were a 300D, then you would be best served to get the fan out of the way, but there is PLENTY of room on the four cylinder.
I noticed that you asked this question AND the question about the transmission plugs. The best way to answer these types of questions is to get on your old clothes and start checking things out with a little experimentation.
Best of luck,