coding key e320

I have a 1997 e320 and need to replace the door sensor due to damage. I'm told that I will have to have the dealer recode my remote. Also I have a key
that needs to be recoded. Does anyone know the procedure for setting them. I would like to avoid paying an additional $100.00 on top of the $120.00 for the new key. Thank you
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
I believe the keys recode themselves; check the owner's book.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Motorsforum.com is a website by car enthusiasts for car enthusiasts. It is not affiliated with any of the car or spare part manufacturers or car dealers discussed here. All logos and trade names are the property of their respective owners.