I am trying to insert an attachment file into a Lotus Notes document using VBA. Here is a simplified version of the code I am using:
Dim Anotesuiworkspace as Object
Dim NUIdoc As Object
Dim rtitem As Object
Dim FileName As String
This creates a new Document and opens it on Lotus Notes
Set Anotesuiworkspace = CreateObject("Notes.Notesuiworkspace")
Set NUIdoc = Anotesuiworkspace.composeDocument("", "", "Dash 8 request")
Random File location
FileName = "C:\Users\k0600292\Desktop\Vacation Tracker\Andy Vacation.xlsx"
'$FILE is the name of the Field I am looking to attach the document into
'Get an error while running the next line saying "Object doesnt support this property or method"
Set rtitem = NUIdoc.GetFirstItem("$FILE")
Set object = rtitem.EmbedObject(EMBED_ATTACHMENT, "", FileName)
End Sub
Any recommendations/suggestions will be greatly appreciated.