Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.outlook.program_vba, microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default "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.
  #2   Report Post  
Posted to microsoft.public.outlook.program_vba,microsoft.public.excel.programming
external usenet poster
 
Posts: 811
Default "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.



  #3   Report Post  
Posted to microsoft.public.outlook.program_vba,microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default "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.

  #4   Report Post  
Posted to microsoft.public.outlook.program_vba,microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default "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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next BCB New Users to Excel 7 May 13th 06 10:02 PM
"WinForm Application" to act as "RTD Server" using .Net mduraidi Excel Discussion (Misc queries) 0 March 30th 06 01:01 PM
Set OutApp = CreateObject("Outlook.Application") - Runtime error 429 Buffyslay Excel Programming 2 July 20th 05 05:06 PM
Why does Outlook.Application.GetNamespace("MAPI") Fail? Lee Excel Programming 4 May 27th 05 02:15 PM


All times are GMT +1. The time now is 12:39 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"