[AccessD] Error loading DLL

MartyConnelly martyconnelly at shaw.ca
Sun Feb 5 17:38:15 CST 2006


INFO: Using Early Binding and Late Binding in Automation
http://support.microsoft.com/?id=245115


If you have delclared OutlookApplication object as Outlook.Application, 
then it
is still early binding as it requires a reference to object library. The
difference  is the way it is created at runtime.  So you maybe getting a 
conflict
in the references especially if more than one version of outlook on machine.

So try this for late binding, you can use the other method if you need 
to debug or use intelisense

Dim OutlookApp As Object
Dim OutlookFile As Object
Dim OutlookMsg As Object
Dim OutlookRecip As Object

If it objects ;) to Object try Variant.





Annie Courchesne, cma wrote:

>Hi,
>
>The error code number is 48.  
>
>I use the following code to send a email :
>
>----
>Dim OutlookApp As Outlook.Application, OutlookFile As Outlook.Attachment
>Dim OutlookMsg As Outlook.MailItem, OutlookRecip As Outlook.Recipient
>
>Public Sub OpenMsgOutlook(EMail As String, PathFile As String)
>
>On Error GoTo err_OpenMsgOutlook
>Set OutlookApp = CreateObject("Outlook.Application")
>Set OutlookMsg = OutlookApp.CreateItem(olMailItem)
>With OutlookMsg
>    Set OutlookRecip = .Recipients.add(EMail)
>    Set OutlookFile = .Attachments.add(PathFile)
>    OutlookRecip.Type = olTo
>    .Display
>End With
>Exit Sub
>
>err_OpenMsgOutlook:
>    Resume Next
>
>End Sub
>----
>
>Depending on what needs to be sent I use this code or another one (the only
>difference is the .display that is being changed to .send).
>
>It always worked great in the past and I don't know why I'm having problem
>with this one computer!!!
>
>Thanks!
>
>
>Annie Courchesne, CMA
>
>
>-----Message d'origine-----
>De : accessd-bounces at databaseadvisors.com
>[mailto:accessd-bounces at databaseadvisors.com] De la part de Doug Murphy
>Envoyé : 4 février 2006 20:26
>À : 'Access Developers discussion and problem solving'
>Objet : Re: [AccessD] Error loading DLL
>
>What is the error number?  How are you using access to send e-mail;
>SendObject?
>
>Doug
>
>-----Original Message-----
>From: accessd-bounces at databaseadvisors.com
>[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Annie Courchesne,
>cma
>Sent: Saturday, February 04, 2006 5:21 PM
>To: 'Access Developers discussion and problem solving'
>Subject: [AccessD] Error loading DLL
>
>
>Hi everyone,
>
> 
>
>I have a database running under A2K runtime on three computers.  I use a
>code to send email using Outlook.  On two computers, it works great.  On the
>third, it does not work.  After testing, I see that the error shown is
>"Error Loading DLL".  
>
> 
>
>Anyone had any problem like this?  I think it may be a problem with Outlook
>on this computer.  Should I reinstall it?  Can I just replace a problem DLL?
>
> 
>
>Thanks!
>
> 
>
> 
>
>Annie Courchesne, CMA
>
> 
>
>  
>

-- 
Marty Connelly
Victoria, B.C.
Canada






More information about the AccessD mailing list