compile error in acess 2003
Posted on 2011-04-27
i have a database in Access 2003 which has worked fine till i moved it to a new server (running Server 2008 R2 Foundation) with outlook 2007. I used to run outlood 2003 on the old server. now when i try to run the below simple email command i get a compile error: Reference Library feature not supported.
I have the Micorsoft Acess 11.0 library and the Microsoft Outlook 12.0 Library ticked in the references. What am i missing?
appreciate your help.
Public Function SendEmailRunrate()
Dim oOApp As Outlook.Application
Dim oOMail As Outlook.MailItem
Set oOApp = CreateObject("Outlook.Application")
Set oOMail = oOApp.CreateItem(olMailItem)
.To = "firstname.lastname@example.org;Bice@team.com;email@example.com;firstname.lastname@example.org"
.Subject = "QTD Runrate COB Yesterday Clifford Gardens and Dalby"
.Body = "Please Find Runrate Attached. Check GRAPH Tab to see how we are going"
'.Attachments.Add "\\server\drive\folder\filename", olByValue, 1
.Attachments.Add ("c:\BC Files\reports\Quarterly.xls")