Hi Notes proof’s,
I’ve made a rutine in VB creating Appointments in a persons calendar, but unfortunately the appointments are not shown in the Group Calendar. Do I miss som hidden fields ?
I’ve enclosed my code:
Function CreateAppDoc(dbMail As NotesDatabase, arrAppData() As String, strDominoServer As String) As NotesDocument
Dim docApp As NotesDocument
Dim a(1) As String
Dim dtDate As NotesDateTime, dtTime As NotesDateTime, dtDateTime As NotesDateTime
Dim x As Variant
Dim itemFld As NotesItem
'Initialize variables
a(0) = "D"
a(1) = "S"
'Set systemvariables on docApp
Set docApp = dbMail.CreateDocument
docApp.excludeFromView = a
docApp.meetingtype = "1"
docApp.appointmentType = "0"
docApp.From = strDominoServer
'Set Public Access Flag
Set itemFld = docApp.ReplaceItemValue("$PublicAccess", "1")
'Set datavariables on docApp
docApp.Form = "Appointment"
docApp.Subject = arrAppData(16)
'MSProj-UNID
docApp.MSPUNID = arrAppData(9)
'StartDate
Set dtDate = ConvToDate(arrAppData(17))
docApp.StartDate = dtDate.LSLocalTime
'StartDateTime
Set dtDateTime = ConvToDateTime(arrAppData(17), arrAppData(19))
docApp.StartDateTime = dtDateTime.LSLocalTime
'StartTime
Set dtTime = ConvToTime(arrAppData(19))
docApp.StartTime = dtTime.LSLocalTime
'CalendarDateTime
Set dtDateTime = ConvToDateTime(arrAppData(17), arrAppData(19))
docApp.CalendarDateTime = dtDateTime.LSLocalTime
'EndDate
Set dtDate = ConvToDate(arrAppData(18))
docApp.EndDate = dtDate.LSLocalTime
'EndDateTime
Set dtDateTime = ConvToDateTime(arrAppData(18), arrAppData(20))
docApp.EndDateTime = dtDateTime.LSLocalTime
'EndTime
Set dtTime = ConvToTime(arrAppData(20))
docApp.EndTime = dtTime.LSLocalTime
'AppLocation
docApp.Location = arrAppData(21)
'AppCategory
docApp.Categories = arrAppData(22)
'Draft
docApp.BookFreeTime = arrAppData(25)
'Privat
docApp.OrgConfidential = arrAppData(26)
'Body
docApp.Body = arrAppData(27)
Call docApp.ComputeWithForm(False, False)
Set CreateAppDoc = docApp
End Function
Can anyone please help me out on this ?
Kindly and thx in advance
Lars