Hallo,
ich hoffe Ihr hattet ein schönes Wochenende....
Mit neuem Elan habe ich mich heute ans Werk gemacht und ich dreh bald durch..
Das To Do erscheint zwar in der To Do-Ansicht, aber nicht im Kalender!
Ich weiß irgendwie nicht mehr weiter.
So sieht mein Code aus, vieleicht weiß ja jemand die Lösung
Sub Click(Source As Button)
Dim session As New notessession
Dim diesedb As notesdatabase
Dim mail As notesdocument ' ToDo-Dokument
Dim workspace As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim dateTime As New NotesDateTime( "28.04.2003 12:01:00" )
Dim Start As String
Dim Due As String
Dim Subject As String
Dim Status As String
Set uidoc = workspace.CurrentDocument
Set doc = uidoc
'Call dateTime.SetNow
Set diesedb = session.currentdatabase
'Werte aus uidoc holen
Adr_Name$ = uidoc.fieldgettext("AdrName")
Adr_Ort$ = uidoc.fieldgettext("AdrOrt")
Adr_Plz$ = uidoc.fieldgettext("AdrPlz")
Adr_Land$ = uidoc.fieldgettext("AdrLand")
aTitel$ = uidoc.fieldgettext("aTitel")
aTXT$ = uidoc.fieldgettext("aTXT")
'.... und ggf. weitere ----
' ToDo generieren
Subject="Bitte Bearbeiten - "+aTXT$+aTitel$+" "+Adr_Name$+" "+Adr_LAnd$+Adr_Plz$+" "+Adr_Ort$
Set mail = diesedb.CreateDocument
Call mail.ReplaceItemValue( "Form", "Task" )
Call mail.ReplaceItemValue("Subject", Subject)
Call mail.ReplaceItemValue("StartDate", dateTime)
Call mail.ReplaceItemValue("DueDate", dateTime)
Set rtitem = New NotesRichTextItem( mail , "Body" )
Call rtitem.appendtext("blabalaballbalblalblalb")
mail.~$AlarmUnit = "D"
mail.~$AlarmMemoOptions = ""
mail.~$Alarm = 1
mail.~$AlarmOffset = 1440
mail.~$CSVersion = "2"
'mail.~$AlarmDescription = Subject
mail.~$Alarms = "1"
mail.~_ViewIcon = 168
mail.~$KeepPrivate = ""
mail.~$ExpandGroups = "3"
mail.~$PublicAccess = "1"
mail.~$WebFlags = "J"
mail.OrgTable = "T0"
mail.WebDateTimeInit = "1"
Set item= New Notesitem(mail,"CalendarDateTime",dateTime)
item.IsSummary = True
Set item= New Notesitem(mail,"DueDateTime",dateTime)
item.IsSummary = True
Set item= New Notesitem(mail,"StartDateTime",dateTime)
item.IsSummary = True
mail.ExcludeFromView = "D"
mail.MailFirstPass = "1"
mail.MailOptions = "0"
mail.DueState = 1
mail.AppointmentType = ""
mail.Importance = "2"
mail.SequenceNum = 1
Set Item = New NotesItem(mail, "Sign", "0")
item.IsSummary = True
Set Item = New NotesItem(mail, "Encrypt", "0")
item.IsSummary = True
mail.TaskType = "1"
mail.Repeats = ""
mail.OrgConfidential = ""
Call mail.Send( False, "snoopy@beagle.de")
End Sub
Gruß
Hitcher