Möchte gerne den Filenamen und die Filegröße eines oder mehrerer Anhänge in ein Feld (D_Info) schreiben. Habe es mit
doc.D_Info = sizes & namen
probiert, leider ist dies aber nicht zulässig. Auch weiss ich nicht, ob es mit zwei Forall-Schleifen eine elegante Lösung ist.
Danke für Eure Hilfe
Sub Click(Source As Button)
Dim s As New NotesSession
Dim db As NotesDatabase
Dim ws As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim doc As NotesDocument
Dim rt As NotesRichTextItem
Dim item As NotesItem
Set uidoc = ws.CurrentDocument
Set doc = uidoc.Document
Set rt = doc.GetFirstItem( "D_Doku" )
If rt Is Nothing Then
Msgbox "Kein Dateianhang vorhanden"
Exit Sub
End If
idx = 0
Forall o In rt.EmbeddedObjects
Redim Preserve sizes(idx)
sizes(idx) = o.Filesize
idx = idx + 1
End Forall
Forall n In rt.EmbeddedObjects
Redim Preserve namen(idy)
namen(idy) = n.name
idy = idy + 1
End Forall
doc.D_Info = sizes
End Sub