| Public Sub SendNotesAppointment(VornameX As String, NachnameX As String, _ |
| WDatumX As Variant, SubjectX As Variant) |
| '***************************************************************************** |
| '* |
| '* Mit dieser Funktion werden Termine aus in den |
| '* Lotus Notes Kalender des Anwenders geschrieben. |
| '* |
| '***************************************************************************** |
| 'Set up the objects required for Automation into lotus notes |
| Dim Maildb As Object 'The mail database |
| Dim MailDbName As String 'The persons notes mail database name |
| Dim CalenDoc As Object 'The calendar entry itself |
| Dim WorkSpace As Object |
| Dim Subject As String 'The Headline |
| Dim Appdate As String 'The calendardate |
| |
| Subject = SubjectX 'Vorlauftext |
| Subject = Subject & VornameX & " " 'Vorname holen |
| Subject = Subject & NachnameX 'Nachname holen |
| Set WorkSpace = CreateObject("Notes.NOTESUIWORKSPACE") |
| Set CalenDoc = WorkSpace.COMPOSEDOCUMENT("", "", "Appointment") |
| CalenDoc.FIELDSETTEXT "AppointmentType", "4" |
| 'AppointmentType 1 = Jahrestag |
| 'AppointmentType 2 = Ganztägige Veranstaltung |
| 'AppointmentType 3 = Beprechung |
| 'AppointmentType 4 = Erinnerung |
| CalenDoc.FIELDSETTEXT "StartDate", CStr(Format(WDatumX, "dd/mm/yy")) |
| CalenDoc.FIELDSETTEXT "startTime", CStr("09:00:00") |
| 'CalenDoc.FIELDSETTEXT "Duration", CStr(Duration) |
| CalenDoc.FIELDSETTEXT "Subject", Subject |
| CalenDoc.FIELDSETTEXT "Body", Subject |
| CalenDoc.FIELDSETTEXT "Categories", "PC" 'PC = Anrufe |
| CalenDoc.Save False, False, False |
| CalenDoc.Close |
| Set Maildb = Nothing |
| Set CalenDoc = Nothing |
| Set WorkSpace = Nothing |
| MsgBox "Der Wiedervorlagetermin ist in Notes übertragen worden" |
| End Sub |