oMsn = CREATEOBJECT("Messenger.UIAutomation.1") is version specific. Try - oMsn = CREATEOBJECT("Messenger.UIAutomation")