Hallo zusammen,
ich habe ein Namenfeld mit Mehrfachwerten.
Diesem möchte ich jetzt neue Namen aus einem Array hinzufügen.
Das neue komplette Array bekomme ich hin. Alle Werte drin und doppelte Einträge sind raus.
Ich bekomme dieses neue Array nur nicht mehr in das original Item zurück geschrieben.
Hier ist der Code: Parameter der Funktion doc,inhalte as Variant, feldName as String
Dim item As NotesItem
Dim count1 As Integer
Dim count2 As Integer
Dim NewBound As Integer
Dim holder As Variant
Dim typ As Integer
Set item = doc.GetFirstItem(feldName)
count1 = Ubound(inhalte)
count2 = Ubound(item.Values)
newBound = count1 + count2 + 1 'Für einen Null Index
Redim holder(newbound)
holder = Arrayappend(item.Values, inhalte)
holder = Arrayunique(holder,1)
typ = Datatype(item.Values)
typ = Datatype(inhalte)
typ = Datatype(holder)
Set item.values = holder
AddNewRoles = True
Exit Function
Die Fehlermeldung ist Type mismatched bei Set item.values = holder.
Die Datentypen sind Values -> 8712, inhalte -> 8712, holder 8716
Da liegt das Problem.
Hat jemand ne Idee zur Lösung?
Gruß Tom