hi umi,
...es geht nicht
. was ist hier falsch? Body bleibt immer leer!!
REM Kalenereintrag erzeugen
Sub Click(Source As Button)
Dim session As New NotesSession
Dim db As New NotesDatabase ("","")
Dim ws As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim doc As NotesDocument
Dim userName As New notesname(session.username)
Dim dbfilename As String
Dim dbserver As String
Dim value As Integer
Dim vondatum As String
Dim bisdatum As String
Dim newdoc As NotesDocument
Dim rtitem As NotesRichtextItemCall db.OpenMail
dbfilename=db.filepath
dbserver = db.server
value = Messagebox ("Soll der Termin " + Chr(10) + "in den Kalender eingetragen werden?", (4+32+0+0), "Abwesenheit in den eigenen Kalender eintragen")
If (value = 6) Then
Set uidoc = ws.CurrentDocument
REM art=uidoc.FieldgetText("MstName1")
kunde=uidoc.FieldGetText( "KUNA1" )
vondatum = uidoc.FieldGetText( "KUBELEN" )
bisdatum = uidoc.FieldGetText( "KUBELEN" )
ort=uidoc.FieldGetText("KUORT")
avs=uidoc.FieldGetText("AVS")
'test=uidoc.FieldGetText("AVS")
REM vonzeit = uidoc.FieldGetText( "vonzeit" )
REM biszeit = uidoc.FieldGetText( "biszeit" )
Print vondatum, bisdatum
Set db = session.CurrentDatabase
Set newdoc = New NotesDocument( db )
Set uidoc = ws.ComposeDocument (dbserver,dbfilename,"Appointment")
Call uidoc.FieldSetText("Subject",kunde & " - " & "Besuch")
Call uidoc.FieldSetText("Location",ort)
Call uidoc.FieldSetText("StartDate",vondatum)
Call uidoc.FieldSetText("EndDate",bisdatum)
Call uidoc.FieldSetText("Categories",avs)
'Call uidoc.FieldSetText("Test",avs)
REM Call uidoc.FieldSetText("StartTime",vonzeit)
REM Call uidoc.FieldSetText("EndTime",biszeit)
Call uidoc.FieldSetText("AppointmentType","2")
Call uidoc.Save()
Call uidoc.Close()
Call uidoc.Save()
Call uidoc.FieldSetText("AppointmentType","2")
Dim tdoc As notesdocument
Set tdoc = uidoc.document
Set rtitem = New NotesRichtextITem(tdoc,"Body")
Call rtitem.appendDoclink(Doc,"Link -->","Link -->")%REM
Messagebox ("Bla Bla Bla!!!!")
Else
Messagebox ("Kalender wurde nicht verändert")
%ENDREM
Call uidoc.refresh
Call uidoc.Save()
Call uidoc.Close()
Call uidoc.refresh
End If
Call uidoc.refresh
Call uidoc.Save()
Call uidoc.Close()
End Sub