It is narrated from Sayyiduna Ibn Abbas (may Allah be pleased with them both) that the Messenger of Allah (peace and blessings be upon him) said: "Whoever visits a sick person and says: 'I ask Allah the Mighty, Lord of the Mighty Throne, to cure you,' then, if his appointed time of death has not come, he will certainly recover." (Shu'bah (may Allah have mercy on him) said: He (that is, the shaykh) narrated it once as a saying of the Prophet (marfu'), and twice not as marfu'.)
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 12677