Error 48 trying to create an instance of Outlook.Application 
Author Message
 Error 48 trying to create an instance of Outlook.Application

I have an app that creates an instance of Outlook.  It works fine for
me and others, but one user gets error #48 when he attempts to use it.
Here's a code snippet.

    Dim oOutlook As Outlook.Application
    On Error Resume Next
    ' Get a handle to the existing instance of the Outlook
    ' application, if any
    Set oOutlook = GetObject("Outlook.Application")
    ' If that failed, create one
    If oOutlook Is Nothing Then
        ' Reset the error
        Err.Number = 0
        Set oOutlook = CreateObject("Outlook.Application")
    End If

I don't know (yet) whether it's failing on the call to GetObject() or
CreateObject().  I'm having the user check his PC for any missing
support files.

The references for the project are set for Outlook 2000.  Does anyone
know if in fact a missing DLL may be to blame?  If so, which one?
Other suggestions?

Thanks,

--
Charles Calvert             |  Software Design/Development
Celtic Wolf, Inc.           |  Project Management
http://www.*-*-*.com/ ;|  Technical Writing
(703) 580-0210              |  Research



Mon, 12 Apr 2004 11:50:01 GMT  
 Error 48 trying to create an instance of Outlook.Application
The GetObject call should look like this:
    Set oOutlook = GetObject(,"Outlook.Application")

You might want to put in code that checks for errors at different
points and then use a msgbox or write to an error log with
descriptions of the error and where it happened to check on this
further.

--
Ken Slovak
[MVP - Outlook]
Lead Author, Professional Outlook 2000 Programming, Wrox Press
Lead Author, Beginning Visual Basic 6 Application Development, Wrox
Press


Quote:
> I have an app that creates an instance of Outlook.  It works fine
for
> me and others, but one user gets error #48 when he attempts to use
it.
> Here's a code snippet.

>     Dim oOutlook As Outlook.Application
>     On Error Resume Next
>     ' Get a handle to the existing instance of the Outlook
>     ' application, if any
>     Set oOutlook = GetObject("Outlook.Application")
>     ' If that failed, create one
>     If oOutlook Is Nothing Then
>         ' Reset the error
>         Err.Number = 0
>         Set oOutlook = CreateObject("Outlook.Application")
>     End If

> I don't know (yet) whether it's failing on the call to GetObject()
or
> CreateObject().  I'm having the user check his PC for any missing
> support files.

> The references for the project are set for Outlook 2000.  Does
anyone
> know if in fact a missing DLL may be to blame?  If so, which one?
> Other suggestions?

> Thanks,

> --
> Charles Calvert             |  Software Design/Development
> Celtic Wolf, Inc.           |  Project Management
> http://www.celticwolf.com/  |  Technical Writing
> (703) 580-0210              |  Research



Tue, 13 Apr 2004 04:54:33 GMT  
 Error 48 trying to create an instance of Outlook.Application
On Thu, 25 Oct 2001 16:54:33 -0400, "Ken Slovak - [MVP - Outlook]"

Quote:
>The GetObject call should look like this:
>    Set oOutlook = GetObject(,"Outlook.Application")

Whoops!  Thanks for spotting that error.  I've fixed it, but it
doesn't affect the problem.

Quote:
>You might want to put in code that checks for errors at different
>points and then use a msgbox or write to an error log with
>descriptions of the error and where it happened to check on this
>further.

Looking into it...

--
Charles Calvert             |  Software Design/Development
Celtic Wolf, Inc.           |  Project Management
http://www.celticwolf.com/  |  Technical Writing
(703) 580-0210              |  Research



Wed, 21 Apr 2004 06:31:15 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Error 48 When Creating an Outlook.application

2. Error 48 When Creating Outlook.Application in VBA

3. Error 48 when loading Outlook-lib

4. Error no. 48: Error opening DLL

5. Run-time error 48 Error in loading DLL in XP

6. Error in loading DLL (Error 48)

7. Error 48: Error Loading DLL

8. Error 48: Error in Loading DLL

9. Error 48: Error in loading Dll.

10. runtime error 48 error loading DLL

11. Error 48 - Error Load DLL

12. Error 48 - Error Loading DLL

 

 
Powered by phpBB® Forum Software