Hi All,
I have written Code in VB to create an Event Registeration item
to particular user MailBox.But its giving Run time error.
Through Excahnge Explorer(Event Registeration Wizard) i can able to create
the
Item.But programmatically its giving problem.
Here is the code for Creating Event Item.
______________________________________________________________
Dim EventRuleItem As String
Dim sEvtRegURL As String
Dim ProcessDefinitionURL As String
Dim Rec As ADODB.Record
Set Rec = New ADODB.Record
'''''''''''''''''''''Register OnSyncSave and OnSyncDelete Events
EventRuleItem = "OnSyncSave_OnSyncDelete_Rule"
sEvtRegURL = sFolderURL & EventRuleItem
ProcessDefinitionURL = sProcDefURL
Rec.Open sEvtRegURL, , adModeReadWrite, _
adCreateNonCollection Or adCreateOverwrite, _
adDelayFetchFields
If Err.Number <> 0 Then
Debug.Print "Failed to open event registration record." &
Err.Description
End If
With Rec
Set Flds = .Fields
Flds("DAV:contentclass") = "urn:content-class:storeeventreg"
Flds("http://schemas.microsoft.com/exchange/events/EventMethod") =
"OnSyncSave;OnSyncDelete"
Flds("http://schemas.microsoft.com/exchange/events/SinkClass") =
"CdoWfEvt.EventSink.1"
Flds("http://schemas.microsoft.com/exchange/events/Criteria") = "WHERE
$DAV:ishidden$ AND $DAV:iscollection$ = FALSE"
Flds("http://schemas.microsoft.com/cdo/workflow/defaultprocdefinition")
= ProcessDefinitionURL
Flds("http://schemas.microsoft.com/cdo/workflow/adhocflows") = 0
Flds("http://schemas.microsoft.com/cdo/workflow/enabledebug") = True
Flds("http://schemas.microsoft.com/cdo/workflow/disablesuccessentries")
= False
Flds.Update
.Close
End With
__________________________________________________________________________-
In the above code its giving error in Update.
if i change the DAV:contentclass property that time its working fine.
If any one knows .. about this issue pls help me
Regards
Vijay
_________________________________________________________________
List posting FAQ: http://www.swinc.com/resource/exch_faq.htm
Archives: http://www.swynk.com/sitesearch/search.asp
To unsubscribe: mailto:[EMAIL PROTECTED]
Exchange List admin: [EMAIL PROTECTED]