G
Guest
Previously worked ok with Access 98 using following code (module):
Function AutomateOutlook(p_to As String, p_subject As String, p_body As
String)
Dim olApp As New Outlook.Application
Dim olMail As Outlook.MailItem
Set olMail = olApp.CreateItem(olMailItem)
With olMail
.To = p_to
.subject = p_subject
.body = p_body
.Send
End With...................................etc...
Problem now is that Access 2000 VBA does not recognise "New
Outlook.Application"
in the DIM statement, giving a compile error - User-defined type not defined.
Any Ideas?
Function AutomateOutlook(p_to As String, p_subject As String, p_body As
String)
Dim olApp As New Outlook.Application
Dim olMail As Outlook.MailItem
Set olMail = olApp.CreateItem(olMailItem)
With olMail
.To = p_to
.subject = p_subject
.body = p_body
.Send
End With...................................etc...
Problem now is that Access 2000 VBA does not recognise "New
Outlook.Application"
in the DIM statement, giving a compile error - User-defined type not defined.
Any Ideas?