|
|
|
date: 26 Apr 2006 03:29:54 -0700,
group: microsoft.public.exchange2000.development
back
Re: Removing appointment from calendar
Problem solved. This works for me:
Dim recDelMsg As New ADODB.Record
recDelMsg.Open(oAppt.Fields("DAV:href").Value, adoCnx, _
ADODB.ConnectModeEnum.adModeReadWrite, _
ADODB.RecordCreateOptionsEnum.adFailIfNotExists, _
ADODB.RecordOpenOptionsEnum.adOpenSource)
recDelMsg.DeleteRecord()
recDelMsg.Close()
recDelMsg = Nothing
yoav.benyosef@gmail.com wrote:
> Hello,
>
> I have problems removing appointments from a calendar if the number of
> attendees is 0. The following code works as expected (cancel messages
> are sent to attendees and original appointment is deleted from meeting
> organizer calendar):
>
> Dim urlCalendar As String = _
> "http://MyExchangeServer/exchange/MailboxName/Calendar"
> Dim adoCnx As New ADODB.Connection
> adoCnx.Provider = "MSDAIPP.DSO"
> adoCnx.Open(urlCalendar)
> Dim oAppt As New CDO.Appointment
> oAppt.DataSource.Open(AppointmentUID, adoCnx, _
> ADODB.ConnectModeEnum.adModeReadWrite, _
> ADODB.RecordCreateOptionsEnum.adFailIfNotExists, _
> ADODB.RecordOpenOptionsEnum.adOpenSource)
> Dim cfg As CDO.Configuration = New CDO.Configuration
> With cfg
> .Fields(CDO.CdoConfiguration.cdoSendEmailAddress).Value = _
> "myaddress@mydomain.com"
> .Fields(CDO.CdoCalendar.cdoTimeZoneIDURN).Value = _
> CDO.CdoTimeZoneId.cdoIsrael
> .Fields(CDO.CdoConfiguration.cdoSendUsingMethod).Value = _
> CDO.CdoSendUsing.cdoSendUsingPort
> .Fields(CDO.CdoConfiguration.cdoSMTPServer).Value = _
> MySMTPServer
> .Fields.Update()
> End With
> oAppt.Configuration = cfg
> oAppt.Cancel.Message.Send() ' Fails if Attendees.count = 0!!!!
> cfg = Nothing
>
> If the appointment number of attendees is 0, the code fails with an
> exception "System.Runtime.InteropServices.COMException - Multiple-step
> OLE DB operation generated errors. Check each OLE DB status value, if
> available. No work was done." Trying only oAppt.Cancel throws an
> exception "The requested property was not found".
>
> TIA
date: 26 Apr 2006 05:18:21 -0700
author: unknown
|
|