![]() |
"Outlook.Application" vs "Outlook.Application.11"
I have some Excel VBA code which does the following:
Dim objOutlook as Outlook.Application Set objOutlook = CreateObject("Outlook.Application") This has been tested and works on Office 2000, 2002/XP, and 2003. However, I recently encountered problems with the CreateObject line on a client's workstation, running Office 2003 SP 1. The error I got was 429 -- "ActiveX Component Can't Create Object". (I got the same error with a GetObject(, "Outlook.Application") call.) A Usenet search showed that this might be due to Outlook addins, but I disabled all of the Outlook addins installed on the machine, and still got this error. On a whim, I changed "Outlook.Application" to "Outlook.Application.11", and the code worked fine. Can anybody explain why this is happening? Is it just a corrupted registry/ Outlook install issue on the client machine, or am I missing something? I have it working for now, but would like to figure out what exactly went wrong, in case it happens again. Thanks in advance for the help. |
"Outlook.Application" vs "Outlook.Application.11"
Hi Nathan,
Look at the registry on this machine under the following key: HKEY_CLASSES_ROOT\Outlook.Application\CurVer\ If the (Default) value under this key is not set to Outlook.Application.11 then my guess would be that either that computer was upgraded from an earlier version of Office and for some reason this key wasn't updated correctly. -- Rob Bovey, Excel MVP Application Professionals http://www.appspro.com/ * Take your Excel development skills to the next level. * Professional Excel Development http://www.appspro.com/Books/Books.htm "Nathan Strom" wrote in message anews.com... I have some Excel VBA code which does the following: Dim objOutlook as Outlook.Application Set objOutlook = CreateObject("Outlook.Application") This has been tested and works on Office 2000, 2002/XP, and 2003. However, I recently encountered problems with the CreateObject line on a client's workstation, running Office 2003 SP 1. The error I got was 429 -- "ActiveX Component Can't Create Object". (I got the same error with a GetObject(, "Outlook.Application") call.) A Usenet search showed that this might be due to Outlook addins, but I disabled all of the Outlook addins installed on the machine, and still got this error. On a whim, I changed "Outlook.Application" to "Outlook.Application.11", and the code worked fine. Can anybody explain why this is happening? Is it just a corrupted registry/ Outlook install issue on the client machine, or am I missing something? I have it working for now, but would like to figure out what exactly went wrong, in case it happens again. Thanks in advance for the help. |
"Outlook.Application" vs "Outlook.Application.11"
Some anti-virus applications have script blockers that don't allow the use of the Outlook.Application object.
-- Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "Nathan Strom" wrote in message anews.com... I have some Excel VBA code which does the following: Dim objOutlook as Outlook.Application Set objOutlook = CreateObject("Outlook.Application") This has been tested and works on Office 2000, 2002/XP, and 2003. However, I recently encountered problems with the CreateObject line on a client's workstation, running Office 2003 SP 1. The error I got was 429 -- "ActiveX Component Can't Create Object". (I got the same error with a GetObject(, "Outlook.Application") call.) A Usenet search showed that this might be due to Outlook addins, but I disabled all of the Outlook addins installed on the machine, and still got this error. On a whim, I changed "Outlook.Application" to "Outlook.Application.11", and the code worked fine. Can anybody explain why this is happening? Is it just a corrupted registry/ Outlook install issue on the client machine, or am I missing something? I have it working for now, but would like to figure out what exactly went wrong, in case it happens again. Thanks in advance for the help. |
"Outlook.Application" vs "Outlook.Application.11"
Sue Mosher [MVP-Outlook] wrote in :
Some anti-virus applications have script blockers that don't allow the use of the Outlook.Application object. Sue, Thanks -- this might be it. I noticed Norton AntiSpyware installed on the system, so chances are there was some sort of blocking going on. Hmm.. If I can write code to check for errors and then try creating the version-specific Outlook objects, I'm sure a malware writer could as well, so it doesn't seem very effective at stopping anything but the simplest of attacks. Oh well. Thanks again for the help. Keep up the good work -- your posts and website have been a great help for me and lots of others I'm sure. -- Regards, Nathan Strom |
All times are GMT +1. The time now is 07:22 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com