In the line: fieldMappings.RemoveFieldMap(fieldMappings.FindFieldMapIndex(field.name))
The words "Remove" and "Find" should not be capitalized. That is, the correct method names are "removeFieldMap" and "findFieldMapIndex", so the correct line is: fieldMappings.removeFieldMap(fieldMappings.findFieldMapIndex(field.name))
Can someone from ESRI confirm/correct the help file? (or let me know why I'm wrong)