Ich hab morz den Stress mit Anhängen.
Hintergrund ist folgender:
2x in der Woche kriegen wir Mails von einer bestimmten Adresse. Diese sollen dann gleich nach Eingang gelößt werden. Hier das Script dazu:
Dim s As New NotesSession
Dim db As NotesDatabase
Dim folder As NotesView
Dim col As NotesDocumentCollection
Dim doc As NotesDocument
Dim body As Variant
Dim Attachments As Variant
Dim path As String
Dim Fullpath As String
Set db = s.CurrentDatabase
Set folder = db.GetView("($Inbox)")
Set col = Folder.GetAllDocumentsByKey(Nothing, True)
Set doc = col.GetFirstDocument
While Not(doc Is Nothing)
If doc.HasEmbedded Then
Set body = doc.GetFirstItem("Body")
Attachments = body.EmbeddedObjects
Forall o In Attachments
'path
path = "c:\temp\work\"
Fullpath = path + o.name
Call o.ExtractFile(Fullpath)
End Forall
End If
Call doc.PutInFolder("Archiv")
Call doc.RemoveFromFolder("($Inbox)")
Stop
Set doc = col.GetNextDocument(doc)
Wend
Bei HasEmbedded kommt zwar ein True zurück, aber das Array von GetEmbedded bleibt leer. Wieso? Und was kann man dagegen tun?
Bei manchen Dokumenten sind zwar Anhänge drin, aber HasEmbedded gibt False zurück und in der Ansicht sieht man die Büroklammer auch nicht.