GRose
Registered User.
- Local time
- Today, 22:37
- Joined
- Mar 4, 2004
- Messages
- 21
Hello all,
I have a database that automatically sends out emails. This has been working fine until today when I get an error:
Compile Error
User-defined type not defined
The code being used is (not written by me):
Public Sub Send(ByVal Email As String, ByVal Subject As String, ByVal htmlbody As String)
On Error GoTo SendMyEmailError
Dim MyOutlook As Outlook.Application
Dim MyMail As Outlook.MailItem
Dim Subjectline As String
Set MyOutlook = New Outlook.Application
Set MyMail = MyOutlook.CreateItem(olMailItem)
With MyMail
.To = Email
.Subject = Subject
.htmlbody = htmlbody
.Send
End With
Set MyMail = Nothing
Set MyOutlook = Nothing
SendMyEmailError:
Exit Sub
End Sub
Any ideas what the problem is? It worked on Friday and the IT people say there have been no changed to the system.
Thanks
I have a database that automatically sends out emails. This has been working fine until today when I get an error:
Compile Error
User-defined type not defined
The code being used is (not written by me):
Public Sub Send(ByVal Email As String, ByVal Subject As String, ByVal htmlbody As String)
On Error GoTo SendMyEmailError
Dim MyOutlook As Outlook.Application
Dim MyMail As Outlook.MailItem
Dim Subjectline As String
Set MyOutlook = New Outlook.Application
Set MyMail = MyOutlook.CreateItem(olMailItem)
With MyMail
.To = Email
.Subject = Subject
.htmlbody = htmlbody
.Send
End With
Set MyMail = Nothing
Set MyOutlook = Nothing
SendMyEmailError:
Exit Sub
End Sub
Any ideas what the problem is? It worked on Friday and the IT people say there have been no changed to the system.
Thanks