Wenn ich das richtig interpretiere, willst Du anstelle von "mail\myname.nsf" in
Set kuidoc = ws.ComposeDocument( "Server", "mail\myname.nsf", "_Calendar Entry")
den Pfad der Maildatenbank des aktuellen Users angeben?
Falls ja, kannst Du den aus der Notes.ini lesen: MailFile=<PFAD>
also
Sub Click(Source As Button)
Dim s As New NotesSession
Dim ws As New NotesUIWorkspace
Dim db As NotesDatabase
Dim uidb As NotesUIDatabase
Dim kuidoc As NotesUIDocument
Dim uidoc As NotesUIDocument
Dim doc As notesdocument
Dim sitem As NotesItem
Dim eitem As NotesItem
Dim mailpath As String
mailpath = s.GetEnvironmentString( "MailFile", True )
Set db = s.currentdatabase
Set uidoc = ws.CurrentDocument
Set kuidoc = ws.ComposeDocument( "Server", mailpath, "_Calendar Entry")
Cat$= uidoc.FieldGetText( "Categories")
If kuidoc.EditMode = True Then
Call kuidoc.FieldSetText("AppointmentType", "2")
Call kuidoc.Refresh
Call kuidoc.FieldSetText("Subject", Cat$)
'Call kuidoc.Save()
End If
End Sub
Andreas