I'm trying to write a VBS Event Sink, and I would like to use the
publish calendar method. However, what is on the MS Exchange SDK site
really doesn't explain how to use it very well. So, I haven't been
able to make it work. Nothing ever gets published to the DL that I
try to send it to. Can someone please help me...
Sub ExStoreEvents_OnSave(pEventInfo, bstrURLItem, lFlags)
' Get message details
Dim objAppointment
Set objAppointment = CreateObject("CDO.Appointment")
objAppointment.DataSource.Open bstrURLItem
subject = objAppointment.subject
starttime = objAppointment.starttime
endtime = objAppointment.endtime
location = objAppointment.location
textboy = objAppointment.textbody
Dim objCalMsg
Dim Config
Dim iPer
Set objCalMsg = CreateObject("CDO.CalendarMessage")
Set Config = CreateObject("CDO.Configuration")
Config.Fields(cdoMailboxURL) = "administrator@mydomain.com"
Config.Fields.Update
With objAppointment
Set .Configuration = Config
'Publish the appointment
' Get CalendarMessage and send to the team.
Set objCalMsg = .Publish
objCalMsg.Message.To = "someone@mydomain.com"
objCalMsg.Message.Send
End With
End Sub
Archived from group: microsoft>public>exchange>applications