CreateObject("Outlook.Application") problem 
Author Message
 CreateObject("Outlook.Application") problem

Hi,

I'm trying to write some functionality around Outlook 2000.  It works fine
when Outlook is running, but fails when it isn't.

I've included my code and the error messages below.  Any help is
appreciated.

Thanks in advance,
John

My code
-----------------------------
    ' initialize if necessary
    If m_oOutlookApp Is Nothing Then

        Set m_oOutlookApp = GetObject(, "Outlook.Application")
        Debug.Print "GetObject(, 'Outlook.Application') throws error : " &
Err.Description

        If m_oOutlookApp Is Nothing Then
            Set m_oOutlookApp = CreateObject("Outlook.Application")
            Debug.Print "CreateObject(, 'Outlook.Application') throws error
: " & Err.Description
        End If
    End If

Debug output
--------------------
GetObject(, 'Outlook.Application') throws error : ActiveX component can't
create object
CreateObject(, 'Outlook.Application') throws error : Automation error
ClassFactory cannot supply requested class
--------------------



Fri, 25 Nov 2005 12:18:20 GMT  
 CreateObject("Outlook.Application") problem
Looks like there is some registration problem with Outlook.  Try repairing
Office and see if it works.

Tom

--
Looking for a good book on developing using ADSI, Exchange Server or
Outlook?  Check out
http://www.amazon.com/exec/obidos/tg/detail/-/0735610193/

This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. ? 2003 Microsoft Corporation. All rights
reserved.


Quote:
> Hi,

> I'm trying to write some functionality around Outlook 2000.  It works fine
> when Outlook is running, but fails when it isn't.

> I've included my code and the error messages below.  Any help is
> appreciated.

> Thanks in advance,
> John

> My code
> -----------------------------
>     ' initialize if necessary
>     If m_oOutlookApp Is Nothing Then

>         Set m_oOutlookApp = GetObject(, "Outlook.Application")
>         Debug.Print "GetObject(, 'Outlook.Application') throws error : " &
> Err.Description

>         If m_oOutlookApp Is Nothing Then
>             Set m_oOutlookApp = CreateObject("Outlook.Application")
>             Debug.Print "CreateObject(, 'Outlook.Application') throws
error
> : " & Err.Description
>         End If
>     End If

> Debug output
> --------------------
> GetObject(, 'Outlook.Application') throws error : ActiveX component can't
> create object
> CreateObject(, 'Outlook.Application') throws error : Automation error
> ClassFactory cannot supply requested class
> --------------------



Sat, 26 Nov 2005 12:04:57 GMT  
 CreateObject("Outlook.Application") problem
If repair doesn't fix problem maybe try specifying object
version in your Get/CreateObject calls

Set m_oOutlookApp = CreateObject
("Outlook.Application.9") 'For Outlook 2000

Quote:
>-----Original Message-----
>Hi,

>I'm trying to write some functionality around Outlook

2000.  It works fine
Quote:
>when Outlook is running, but fails when it isn't.

>I've included my code and the error messages below.  Any
help is
>appreciated.

>Thanks in advance,
>John

>My code
>-----------------------------
>    ' initialize if necessary
>    If m_oOutlookApp Is Nothing Then

>        Set m_oOutlookApp = GetObject

(, "Outlook.Application")
Quote:
>        Debug.Print "GetObject(, 'Outlook.Application')
throws error : " &
>Err.Description

>        If m_oOutlookApp Is Nothing Then
>            Set m_oOutlookApp = CreateObject

("Outlook.Application")
Quote:
>            Debug.Print "CreateObject

(, 'Outlook.Application') throws error
Quote:
>: " & Err.Description
>        End If
>    End If

>Debug output
>--------------------
>GetObject(, 'Outlook.Application') throws error :

ActiveX component can't
Quote:
>create object
>CreateObject(, 'Outlook.Application') throws error :
Automation error
>ClassFactory cannot supply requested class
>--------------------

>.



Tue, 06 Dec 2005 01:58:11 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Problems with Createobject("Outlook.Application")

2. CreateObject("Outlook.Application")

3. CreateObject("Outlook.Application")

4. CreateObject("Outlook.Application")...

5. CreateObject("Outlook.Application") does not work

6. CreateObject("Excel.Application") problem

7. CreateObject("Excel","//server"), MsgBox output

8. CreateObject("Excel","//server"), MsgBox output

9. CreateObject("Access.application.8")

10. Application.CreateObject("DAO.DBEngine") : Error

11. Set xLApp = CreateObject("Excel.Application")

12. Server.CreateObject("Excel.Application")

 

 
Powered by phpBB® Forum Software