Export Dates and times to Outlook Calender

  • Thread starter Thread starter Lauri
  • Start date Start date
L

Lauri

I have written an Event Scheduler application in Access
2000. What I am trying to do is write a function that
will export these Event dates and post it to my caledar
in outlook. Does any one know how I could accomplish
this.
 
Here is some code (from: http://tinyurl.com/2knwj , where you will find
additional examples) which will get you started:

Dim rs as DAO.Recordset
Dim db as DAO.Database
Dim olApp As Outlook.Application
Dim olNewMeeting As Outlook.AppointmentItem
Dim strSQL as String

Set db = CurrentDB
Set olApp = New Outlook.Application

strSQL = "Select * from tblAppointments"
Set rs = db.OpenRecordset(strSQL, dbOpenDynaset)
Do while not rs.EOF()
Set olNewMeeting = olApp.CreateItem(olAppointmentItem)
With olNewMeeting
'***Substitute your recordset field names below,
'where appropriate.
.Recipients.Add "Your profile name or email address"
.Start = #7-21-99 2:30:00 PM#
.Duration = 30
.Importance = olImportanceHigh
.Subject = "Programming Outlook"
.Save
End With
rs.MoveNext
Loop
rs.close
set rs=nothing
set olApp = nothing


Note that you will need to set a reference to the Microsoft DAO x.xx Object
Library and Microsoft Outlook xx.x Object Library which are appropriate to
your versions of Access and Outlook.

hth,
 
Back
Top