jadams0173
Technical User
- Feb 18, 2005
- 1,210
I have a function that sends a report as an attachment. However, I keep getting error -2079129597 Internal application error on the red line below. This code use to work on this machine and works fine on about 10 others.
The only thing I've found so far was Microsoft Outlook object 9.0 library had MISSING beside it. I unchecked the box, closed the mdb then opened and rechecked the box and all seemed well. I've made sure that MSOUTL9.OLB exisits and it's the same version as working machines.
One other thing was the outlook exchange server was wrong so I changed that to what it should be. Outlook itself works fine. I can send an receive emails. Here is the part of the function that fails.
Any ideas? Thanks is advance!
I tried to have patience but it took to long!
-DW
The only thing I've found so far was Microsoft Outlook object 9.0 library had MISSING beside it. I unchecked the box, closed the mdb then opened and rechecked the box and all seemed well. I've made sure that MSOUTL9.OLB exisits and it's the same version as working machines.
One other thing was the outlook exchange server was wrong so I changed that to what it should be. Outlook itself works fine. I can send an receive emails. Here is the part of the function that fails.
Code:
Dim otk As Outlook.Application
Dim eml As Outlook.MailItem
Dim strList As String
Dim rs As ADODB.Recordset
On Error GoTo ERRHANDLER:
'On Error Resume Next
' Open your table and build your distribution list
Set rs = New ADODB.Recordset
With rs
.Open "tblEmail", CurrentProject.Connection, adOpenStatic, adLockReadOnly, adCmdTable
End With
Do While Not rs.EOF
strList = strList & Trim(rs.Fields("EmailAddress").Value) & ";"
rs.MoveNext
Loop
rs.Close
Set rs = Nothing
Set otk = CreateObject("Outlook.Application")
[red] Set eml = otk.CreateItem(olMailItem)[/red]
With eml
.
.
.
Any ideas? Thanks is advance!
I tried to have patience but it took to long!