Export Appointments to Outlook

kermit5

Registered User.
Local time
Today, 16:07
Joined
Nov 2, 2001
Messages
122
Is there a way to export date/time appointments from my A2K2 database to my outlook callendar?

What I have is a calendar of projects that have bid dates assigned to them. I would like to export the date, time and name of the project automatically to Outlook where I can manage the time required.

Any ideas?

Thanks!
Scott
 
I use the following subroutine within a holiday/absence database. When a user adds an 'event' I call this routine and it adds it into their outlook calendar.

Hope it helps.

Matt.

Code:
Public Sub sAddAppointment(datFromDate As Date, datToDate As Date, strCatCode As String, strHalfDay As String, strComment As String)
' Subroutine to add a new appointment to the Outlook calendar
' Parameters brought in: datFromDate - Start date of event
'                        datToDate   - End date of event
'                        strCatCode  - Event type (H, S, SL etc..)
'                        strHalfDay  - AM or PM
'                        strComment  - Any comment, i.e. Excel Course
Dim outApp As Outlook.Application ' An instance of Outlook
Dim outAppoint As Outlook.AppointmentItem ' An appointment
Dim strCategory As String ' The full category name (i.e. Holiday)
    strCategory = DLookup("[Full Cat]", "tblCategories", "[Short Code] = '" & strCatCode & "'")
Set outApp = New Outlook.Application
Set outAppoint = outApp.CreateItem(olAppointmentItem)
    With outAppoint
    If strHalfDay = "" Then ' If not a half day
    .Start = datFromDate
    If datToDate > datFromDate Then .End = datToDate + 1
    .AllDayEvent = True
    ElseIf strHalfDay = "AM" Then ' If half day (morning)
    .Start = datFromDate & " 09:30:00 AM"
    .Duration = 210
    ElseIf strHalfDay = "PM" Then ' If half day (afternoon)
    .Start = datFromDate & " 02:00:00 PM"
    .Duration = 210
    End If
    If strComment <> "" Then .Subject = strCategory & " (" & strComment & ")" Else .Subject = strCategory
    .BusyStatus = olOutOfOffice
    .ReminderSet = False
    .Body = "Added to your calendar by " & strThePNamE & " - " & Date
    .Save
    End With
Set outAppoint = Nothing
Set outApp = Nothing
End Sub
 

Users who are viewing this thread

Back
Top Bottom