"Object required" is vbscript's way of telling you that you tried to call a method of something which isn't an object, most likely it's NULL (or Nothing
). The only object you're working with is objOutlook
so probably CreateObject
failed. Check to be sure that Outlook is registered correctly (The following registry key should exist HKEY_CLASSES_ROOT\Outlook.Application\CLSID
).
Another problem may be if you have a 64 bit version of office installed, since QTP is a 32 bit application it can't create 32 bit objects (as explained here), although that refers to InprocServer s, I'm not sure if it applies to LocalServer s