Zum Shell Problem, vielleicht hilft der Link
http://www.freevbcode.com/ShowCode.Asp?ID=99 und das mit Anhang im FontEnd an RTItem Anhängen ist wirklich echt übel tricky. Aber hab hier mal eine Funktion.
Sub AddAttachment(uiws As NotesUIWorkspace, FormName As String,ItemName As String,FileName As String)
Dim uidoc As NotesUIDocument
Dim ws As New NotesUIWorkspace
Dim thisdoc As NotesDocument
Dim rtitem As NotesRichTextItem
Dim olduidoc As NotesUIDocument
Set olduidoc=uiws.CurrentDocument
Set thisdoc = uiws.CurrentDocument.Document ' doc in memory but hasn't been saved yet
thisdoc.RemoveItem ItemName
Set rtitem = New NotesRichTextItem (thisdoc,ItemName)
rtitem.EmbedObject EMBED_ATTACHMENT, "", FileName
rtitem.Update
thisdoc.Form=FormName
' set the SaveOptions field so that when the uidoc is closed, the user won't be asked to save
thisdoc.SaveOptions = "0"
' close the uidoc. It won't actually happen until the code is finished executing
olduidoc.Close False
' create a new uidoc and open the backend doc that is still in memory with added doc link
Set uidoc = uiws.EditDocument(True, thisdoc)
' delete the reference to the old uidoc
' this is necessary because the code below affects it if left in memory
Delete olduidoc
' re-associate the variable with the backend doc
' have to do this because the olduidoc reference was deleted
Set thisdoc = uidoc.Document
' remove the SaveOptions field so the doc can be saved
thisdoc.RemoveItem "SaveOptions"
uidoc.Refresh
End Sub
Hoffe hilft weiter.
Gruss
Remo