"Outlook.Application" vs "Outlook.Application.11"

N

Nathan Strom

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.
 
R

Rob Bovey

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
 
S

Sue Mosher [MVP-Outlook]

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

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
N

Nathan Strom

Sue Mosher [MVP-Outlook] wrote in said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top