I can create a single dir and attachment, but can’t get it to create multiple dir’s.
Sub Initialize
On Error Goto errH
Set S = New NotesSession
Set db =S.currentdatabase
Set collection = db.unprocesseddocuments
Set doc = collection.GetFirstDocument()
While Not (doc Is Nothing)
Set rtm = doc.GetFirstItem("Image")
If Dir$("C:\Attachment Files",16) = "" Then
Mkdir "C:\Attachment Files"
End If
If ( rtm.Type = RICHTEXT ) Then
Forall o In rtm.EmbeddedObjects
Call o.ExtractFile _
( "C:\Attachment File\" & o.name)
'Call o.Remove
Call doc.Save( True, True )
End Forall
End If
Set doc = collection.GetNextDocument(doc)
Wend
Exit Sub
errH:
Msgbox "Error in line " & Cstr(Erl) & " & error is: " & Error, 64, ".: ERROR :."
Exit Sub