I have written some code in access to be able to add a calender entry to outlook with a reminder. The details of this are also stored to an access table.
the code in access which writes to outlook is as follows:
What I want to do is that if someone updates the entry from outlook, then it updates the entry in access and vise versa.
I am guessing that as a first stage when the entry is initially added to outlook I need to get and store the entry ID for this but am not sure how this is done? Help appreciated.
Also then how do i update it from access to outlook? and then outlook to access?
Help appreciated.
Sample code would be great if anyone has done this before. I know it is possible just have no idea how to go about it.
If you need more detail please ask.
Thanks in advance.
Cheers,
Neemi
the code in access which writes to outlook is as follows:
Code:
Public Function SetOutlookReminder(vtApptDate As Variant, _
vtApptTime As Variant, _
strSubject As String, _
strBody As String, _
intRemMinsBeforeStart As Integer, _
blnSetReminder As Boolean)
On Error GoTo ErrorHandler
'// =================================================================================
Dim sMessage As String
Dim objOutlook As Outlook.Application
Dim objAppt As Outlook.AppointmentItem
Set objOutlook = CreateObject("Outlook.Application")
Set objAppt = objOutlook.CreateItem(olAppointmentItem)
With objAppt
.Start = vtApptDate & " " & vtApptTime
.subject = strSubject
.Body = strBody
.ReminderMinutesBeforeStart = intRemMinsBeforeStart
.ReminderSet = blnSetReminder
.Save
.close (olSave)
End With
Set objAppt = Nothing
Set objOutlook = Nothing
Exit_ErrorHandler:
Exit Function
ErrorHandler:
MsgBox Err.Number & " - " & Err.Description, vbOKOnly + vbExclamation, "CLM Outlook Reminder Error"
Resume Exit_ErrorHandler
End Function
What I want to do is that if someone updates the entry from outlook, then it updates the entry in access and vise versa.
I am guessing that as a first stage when the entry is initially added to outlook I need to get and store the entry ID for this but am not sure how this is done? Help appreciated.
Also then how do i update it from access to outlook? and then outlook to access?
Help appreciated.
Sample code would be great if anyone has done this before. I know it is possible just have no idea how to go about it.
If you need more detail please ask.
Thanks in advance.
Cheers,
Neemi