We are trying to get the file name of an attachment in a previously created document. We know that the file is sitting in the $File object. Within the object we see the File Name: SOMETHING-Resume.doc. How can I get the file name using Lotus Script. Here is what I have thus far but the attachment is in the $FILE variable and I am needing to get the name.
Thanks in advance for your help.
Jean
Dim session As New NotesSession
Dim workspace As New NotesUIWorkspace
Dim db As NotesDatabase
Dim uidoc As NotesUIDocument
Dim doc As NotesDocument
Dim rtitem As Variant
Dim object As NotesEmbeddedObject
Dim sourceName As String
Set db = session.CurrentDatabase
Set uidoc = workspace.CurrentDocument
Set doc = uidoc.Document
Set rtitem = doc.GetFirstItem( “AttachmentField” )
If ( rtitem.Type = RICHTEXT ) Then
Set object = rtitem.GetEmbeddedObject( “???” )
sourceName = object.Source
End If
End Sub