How do I send an Email (using Outlook 2000) from Access 2000

  • Thread starter Thread starter Guest
  • Start date Start date
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?
 
You need to set a reference to the version of Outlook that you are using to
make this code work. Go to any code window and choose Tools ... References,
uncheck the one marked "MISSING", then find the reference to the version of
Outlook you are using.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top