Here is some code that sends information to the calendar, but it is the same
principle If you need help with definition I would go to an Outlook
newsgroups and post there. You do realize that most of the information below
will have to be changed to suit your needs. Don't forget to set your object
to nothing at the end!
------------Start code---------------
Dim objOApp As New Outlook.Application
Dim objAppt As AppointmentItem
Dim oExp As Outlook.Explorer
Dim i As Long
Dim j As Long
Dim oItems As Outlook.Items
Dim oFilter As Outlook.Items
Dim sEventID As String
Set oItems = objOApp.Session.GetDefaultFolder(olFolderCalendar).Items
sEventID = Forms![frmOrder]![Events].Form!EventID
Set oFilter = oItems.Restrict("[Subject] = '" & sEventID & "'")
Set objAppt = objOApp.CreateItem(olAppointmentItem)
Set oExp = objOApp.Session.GetDefaultFolder(olFolderInbox).GetExplorer
If oFilter.Count > 0 Then
'item already exists with that value
j = oFilter.Count
For i = j To 1 Step -1
Set oAppt = oFilter(i)
oAppt.Delete
With objAppt
.ReminderOverrideDefault = True
.ReminderSet = True
.ReminderMinutesBeforeStart = 1440 '1 Day
.Subject = EventID
.Importance = 2 ' high
.Start = PUDate
.End = DODate
.Body = PULocation & " - " & DOLocation & " - " & Notes & " - " &
EventDescription
.MeetingStatus = 1
.ResponseRequested = False
.Save 'Comment out if you do not want message saved to your sent
items folder
.Send
MsgBox "The event has been updated."
End With
Next i
Else
With objAppt
.ReminderOverrideDefault = True
.ReminderSet = True
.ReminderMinutesBeforeStart = 1440 '1 Day
.Subject = EventID
.Importance = 2 ' high
.Start = PUDate
.End = DODate
.Body = PULocation & " - " & DOLocation & " - " & Notes & " - " &
EventDescription
.MeetingStatus = 1
.ResponseRequested = False
.Save 'Comment out if you do not want message saved to your sent
items folder
.Send
MsgBox "The event has been sent."
End With
End If
Set objOApp = Nothing
Set objAppt = Nothing
Set oExp = Nothing
Set oItems = Nothing
Set oFilter = Nothing
End Sub
--------end code------------