sry...
also: mein problem ist, dass der user das dokument nicht bearbeiten kann, er aber einen anhang einfügen können soll!
ich hab mittlerweilen nach langem probieren auch was gefunden.
hier der code:
Sub Click(Source As Button)
Dim workspace As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim doc As NotesDocument
Dim anhang As NotesRichTextItem
Dim datei As Variant
Dim strUNID As String
Dim db As NotesDatabase
Dim pDoc As NotesDocument
Dim s As New NotesSession
Set db = s.CurrentDatabase
Set uidoc = workspace.CurrentDocument
Set doc = uidoc.Document
Set Anhang = New NotesRichTextItem(doc, "gf_Anhang")
datei = workspace.OpenFileDialog(False, "Datei auswaehlen")
If Isempty(datei) Then Exit Sub
If anhang.type = 1 Then
Call anhang.EmbedObject( EMBED_Attachment, "", datei(0))
Call doc.Save( True, False )
strUNID = uidoc.Document.iDocID( 0 )
Call uidoc.Close
Set pDoc = db.GetDocumentByUNID( strUNID )
workspace.EditDocument False, pDoc
End If
End Sub