Dim pathName As String, fileName As StringpathName$ = "c:\*.*"fileName$ = Dir$(pathName$, 0)Do While fileName$ <> "" Print fileName$ fileName$ = Dir$()Loop
Dim session As New NotesSessionDim db As NotesDatabaseDim doc As NotesDocumentDim rtitem As NotesRichTextItemDim object As NotesEmbeddedObjectSet db = session.CurrentDatabaseSet doc = New NotesDocument( db )Set rtitem = New NotesRichTextItem( doc, "Body" )Set object = rtitem.EmbedObject _( EMBED_ATTACHMENT, "", "c:\jim.sam")doc.Form = "Main Topic"doc.Subject = "Here's Jim's document, as an attachment"Call doc.Save( True, True )
' Delete the file c:\test from the file system.Kill "c:\test"