Sayyiduna Ibn Abbas (may Allah be pleased with them both) said: It was asked: O Messenger of Allah, when were you written down as a Prophet? He (peace and blessings be upon him) said: "When Adam (peace be upon him) was (still) between the soul and the body."
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 12518