[AccessD] Run Time Error 48. Fail To Load DLL.

Millaud, Michael J [ITS] Mike.Millaud at mail.sprint.com
Fri Aug 29 12:58:50 CDT 2003


Hey All,

I recently down graded an XP Database to Access2k to avoid the cost and hassle of installing XP or a 97 Database in a new group of users machines.  As expected of the 20+ users One receives the RunTime Error 48 Fail To Load DLL.  I have relaoded Access2k thinking an Access DLL was bad but did not help.  I transferred a couple the Outlook MSOUTL09.OLB that works for me and removed the reference that was used referenced this one instead, again to no avail.  Is there something else I should look into?  The debug drops errors at line:   Set myOlApp = CreateObject("Outlook.Application") in the following code.  Again, this works for all but one user so I am at a loss.  Please help.  


XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Dim Inc As String
Dim strName As String
Dim strName2 As String
Dim stDocName As String
Dim DB As Database
Dim RS As Recordset
Dim strCapture As String
Dim strSQL As String
Dim strSaveName As String

DoCmd.SetWarnings False
    stDocName = "qryMainFilter"
    DoCmd.OpenQuery stDocName, acNormal, acEdit
DoCmd.SetWarnings True
Set DB = CurrentDb
strSQL = "SELECT tblLetterType.Desc FROM tblOutPut LEFT JOIN tblLetterType ON tblOutPut.LetterType = tblLetterType.LetterTag GROUP BY tblLetterType.Desc;"
Set RS = DB.OpenRecordset(strSQL)

RS.MoveLast
strCapture = RS.Fields("Desc")

Inc = Me!txtIncVal
strName = Me!txtSaveString
strName2 = "Source" & "_" & strName

strSaveName = "C:\PCSLetters\Hist\" & strName & "_" & strCapture & "_" & Inc & ".txt"

    DoCmd.TransferText acExportFixed, "OutPut_Spec", "tblOutPut", "C:\PCSLetters\Hist\" & strName & "_" & strCapture & "_" & Inc & ".txt"
    DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel97, "tblOutPut", "C:\PCSLetters\Hist\" & strName & "_" & strCapture & "_" & Inc & ".xls"

'Hmmm What is this??    DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel97, "tblFilter", "C:\PCSLetters\Hist\" & strName2 & "_" & strCapture & "_" & Inc & ".xls"


'>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
'>>> E-Mail Process Below
'>>>
'>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
'Dim StrSendFileName As String
Dim myOlApp As Outlook.Application
Dim myItem As Outlook.MailItem
Dim myAttachments As Variant

'StrSendFileName = "c:\pcsletters\CreditClasslOutPut.xls"
Set myOlApp = CreateObject("Outlook.Application")        '<---------- ERROR IS HERE!
Set myItem = myOlApp.CreateItem(olMailItem)
Set myAttachments = myItem.Attachments
myAttachments.Add strSaveName
With myItem
.Subject = "PCS A/R Letter Process"
.Body = "File Saved as " & strSaveName & vbCrLf & "Attached is one of the PCS A/R Letters files!" & vbCrLf
.To = "mike.millaud at mail.sprint.com;Roberta.Snyder at mail.sprint.com"
'.BCC = "whoever at Comp.com"
'.Attachments = myAttachments
.Send
End With
Set myOlApp = Nothing
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX




Thanks

Mike
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://databaseadvisors.com/pipermail/accessd/attachments/20030829/c9473f56/attachment.html>


More information about the AccessD mailing list