Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cant find Outlook.Application to Email Attachments

Status
Not open for further replies.

sirrodii

Programmer
Jul 15, 2002
8
US
I am trying to send emails with attachments and have seen this block of code mentioned several times.

Dim outApp As Outlook.Application
Dim outMessage As Outlook.MailItem
Set outApp = CreateObject("Outlook.application")
Set outMessage = outApp.CreateItem(olMailItem)

However, when it runs it does not know what Outlook.Application is. It also does nt know olMailItem. Is there something that has to be installed? If so where can I find it? I am using Access 2000.
 
You need to add a reference (Tools, References from the VBA editor window) to your Outlook Object Library. It'll be listed as something like Micrsofto Outlook n.0 Object Library, where n is your version number (e.g. 9.0, not 2000.0!)

HTH [pc2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top