вот (по варианту Darker) как-то так, для одного дока:
Добавлено: к path можно добавлять unid
Код:
Function DetachDocFiles(objdoc As NotesDocument, filter As String, filesList List As String) As String
Dim file As String, path As String
Dim fNames As Variant
Dim o As NotesEmbeddedObject
On Error Goto ErrorHandler
Erase filesList
path=Replace(GetNotesTempDirectory(),{\},{/}) & {/}
file=""
fNames=Evaluate("@AttachmentNames(0)", objdoc)
Dim detach As Boolean
Forall a In fNames
Set o=objdoc.GetAttachment(a)
detach=True
If (filter<>"") Then
If Not (Lcase(o.Name) Like filter) Then
detach=False
End If
End If
If detach Then
file=o.Name
filesList(file)=path
Call o.ExtractFile(path & file)
End If
End Forall
If file<>"" Then DetachDocFiles=path & file
Quit:
Exit Function
ErrorHandler:
Call RaiseError()
Erase filesList
Resume Quit
End Function
Добавлено: к path можно добавлять unid