Beiträge von beyerste

    Die cluster.ncf wird aber nicht bei jedem Zugriff auf den Server geschrieben/aktualisiert.
    So wie ich es jetzt Probiert habe, wird die cluster.ncf nur vom "Datenbank Öffnen" und "Suche Replik" Dialog aktualisiert.
    Ein einfacher Klick auf eine Kachel und den darauf resultierenden Zugriff auf den Server reicht nicht aus.

    So, hier mal mein Agent.
    Den Code kann man als Agent in das Adressbuch einfügen.
    Der markierte Eintrag wird dann von dem Agenten bearbeitet.


    Wichtig ist auch das Setzen des Appointmenttype. Da auch dieses Feld bei dem Import der Kalenderdaten aus Outlook fehlt.


    Und wie immer: ich übernehme keine Haftung für irgend etwas



    <-----CUT------>
    Sub Initialize
    On Error Resume Next


    Dim session As New notessession
    Dim curdb As NotesDatabase

    Dim uiws As New NotesUIWorkspace

    Set curdb = session.CurrentDatabase

    Dim db As notesdatabase

    Dim documents As NotesDocumentCollection
    Dim kalender As notesdocumentcollection

    Dim doc As notesdocument
    Dim kalenderdoc As notesdocument
    Dim calendarprofile As NotesDocument

    Dim item As notesitem
    Dim i As Integer
    Dim j As Integer

    Dim temp() As NotesDateTime
    Dim begindate As NotesDateTime
    Dim enddate As NotesDateTime
    Dim ndttmp As NotesDateTime
    Dim daten As String
    Dim apptype As String

    Set documents = curdb.UnprocessedDocuments

    Set doc = documents.GetFirstDocument

    While Not doc Is Nothing

    Set db = New NotesDatabase("","")
    Call db.open(doc.mailserver(0),doc.mailfile(0))
    Print ("-----")
    Print (db.Title)

    Set calendarprofile = db.GetProfileDocument("CalendarProfile")

    'User im CalendarProfile korrigieren
    If Not calendarprofile Is Nothing Then
    calendarprofile.owner = doc.owner(0)
    Call calendarprofile.Save(True,False,False)
    End If

    ' Kalenderdokumente korrigieren

    Set kalender = db.Search({form="Appointment" }, Nothing,False)

    Set kalenderdoc = kalender.GetFirstDocument

    While Not kalenderdoc Is Nothing

    ' If kalenderdoc.HasItem("$CSVersion") Then
    ' Print ("$CSVersion gelöscht")
    ' Call kalenderdoc.RemoveItem("$CSVersion")
    ' End If

    Print (kalenderdoc.subject(0))

    If Not kalenderdoc.HasItem("CalendarDateTime") Then
    Print ("CalendarDateTime berechnen")
    Set item = kalenderdoc.GetFirstItem("starttime")
    Set begindate = item.DateTimeValue
    Set item = kalenderdoc.GetFirstItem("endtime")
    Set enddate = item.DateTimeValue

    If kalenderdoc.HasItem("RepeatInstanceDates") Then
    kalenderdoc.CalendarDateTime = kalenderdoc.RepeatInstanceDates
    Else
    If Not (begindate Is Nothing Or enddate Is Nothing) Then

    If enddate.TimeDifference(begindate)<0 Then
    Set ndttmp = begindate
    Set begindate = enddate
    Set enddate = ndttmp
    End If
    Print ("Anfang: " & begindate.LocalTime)
    Print ("Ende: " & enddate.LocalTime)

    daten = begindate.LocalTime
    Print (daten)

    i = 0
    Set ndttmp = New NotesDateTime(begindate.LocalTime)
    ' Anzahl feststellen
    While(ndttmp.DateOnly <> enddate.DateOnly)
    i = i + 1
    ' Print (i)
    ndttmp.AdjustDay(1)
    Wend
    Redim Preserve temp(i)

    ' Set temp(0) = begindate
    For j = 0 To i
    Set temp(j) = New notesdatetime(begindate.LocalTime)
    Call begindate.AdjustDay(1)
    Next
    kalenderdoc.CalendarDateTime = temp
    End If
    End If
    End If


    ' Appointmenttype berechnen
    If Not kalenderdoc.HasItem("AppointmentType") Then
    apptype="-"
    Set item = kalenderdoc.GetFirstItem("starttime")
    Set begindate = item.DateTimeValue
    Set item = kalenderdoc.GetFirstItem("endtime")
    Set enddate = item.DateTimeValue

    If apptype="-" And kalenderdoc.HasItem("RequiredAttendees") Then
    apptype="3"
    End If

    If apptype="-" And begindate.GMTTime = enddate.GMTTime Then
    apptype="4"
    End If

    If apptype="-" And begindate.TimeOnly = "04:00:00" And enddate.TimeOnly="20:00:00" Then
    Stop
    If kalenderdoc.HasItem("Repeats") Then
    If kalenderdoc.repeats(0)="1" Then
    apptype="1"
    Else
    apptype="2"
    End If
    Else
    apptype="2"
    End If
    End If

    If apptype="-" Then
    apptype="0"
    End If
    kalenderdoc.appointmenttype= apptype
    End If

    Call kalenderdoc.Save(True,False,False)

    ' Call kalenderdoc.ComputeWithForm(True, False)
    Set kalenderdoc = kalender.GetNextDocument(kalenderdoc)
    Wend
    Set doc = documents.GetNextDocument(doc)
    Wend



    <-----CUT------>

    hallo,


    was auch hilft ist:
    als "Local primary Internet domain" eine fiktive Domain eintragen. und die primary Domain in "Alternate Internet domain aliases" eintragen.
    So funktioniert es jedenfalls bei uns.