Hi,
sorry ich hab da ein Teil vergessen bzw. falsch gepostet
also hier noch mal das richtige, die Fehlermeldung kommt bei "Call rtitem2.AppendDocLink(doc,"")"
Dim rtitem2 As NotesRichTextItem
Dim view As NotesView
Dim ndc As NotesDocumentCollection
Dim uidoc As NotesUIDocument
Dim ws As New NotesUIWorkspace
Dim db2 As NotesDatabase
Dim doc As NotesDocument
Dim doc_cur As NotesDocument
Dim customer_in_pmr As String
Dim var As Variant
Dim pmr_nr As Variant
Set db2= New NotesDatabase(servername,Pfad)
Set uidoc=ws.CurrentDocument
Set doc_cur=uidoc.Document
Set view=db2.GetView(viewname)
Set rtitem2=doc_cur.GetFirstItem("pmr_doc_link")
customer_in_pmr=uidoc.FieldGetText("Customer_in_PMR_DB")
Set ndc=view.GetAllDocumentsByKey(customer_in_pmr,True)
Set doc=ndc.GetFirstDocument()
If ndc.Count<1 Then
Msgbox "no pmrs"
Else
While Not doc Is Nothing
pmr_nr=doc.GetItemValue("PMR")
Call rtitem2.AppendDocLink(doc,"")
Wend
End If
Tschuldigung für die Verwirrung, die ich gestifftet habe