crpjaviman
Technical User
Hi,
I work at a company that has Lotus Notes 5.0.11 running on XP OS. I am trying to open, launch, or extract an attachment from within a Notes database to Excel or even to the Desktop as a file, doesn't matter. I have been able to get to the $File item but no further than that. I have put some of the code I am using but I am still testing this code.
Dim session As Object
Dim dbdoc As Object
Dim DocView As Object
Dim NotesN As Object
Dim obj As NotesEmbeddedObject
Dim doc, doc1 As Object
Set session = CreateObject("Notes.Notessession" 'create notes session
'Call session.Initialize
Set dbdoc = session.GetDatabase("Server", "UNBOpRpt.nsf"
Set DocView = dbdoc.GetView("Reports by date"
Call DocView.Clear
Set NotesN = DocView.GetAllDocumentsByKey(#12/11/2003#, False)
cnt = NotesN.Count 'Count is 3
Set doc = DocView.GetFirstDocument("Daily Report"
Set doc1 = doc.GetFirstItem("$FILE"
doc1.ExtractFile ("$FILE" 'This part is where the program hangs "Object does not support this property."
Can anyone lead down the right path? What am I doing wrong?
Thanks in advance,
Thanks,
crpjaviman
I work at a company that has Lotus Notes 5.0.11 running on XP OS. I am trying to open, launch, or extract an attachment from within a Notes database to Excel or even to the Desktop as a file, doesn't matter. I have been able to get to the $File item but no further than that. I have put some of the code I am using but I am still testing this code.
Dim session As Object
Dim dbdoc As Object
Dim DocView As Object
Dim NotesN As Object
Dim obj As NotesEmbeddedObject
Dim doc, doc1 As Object
Set session = CreateObject("Notes.Notessession" 'create notes session
'Call session.Initialize
Set dbdoc = session.GetDatabase("Server", "UNBOpRpt.nsf"
Set DocView = dbdoc.GetView("Reports by date"
Call DocView.Clear
Set NotesN = DocView.GetAllDocumentsByKey(#12/11/2003#, False)
cnt = NotesN.Count 'Count is 3
Set doc = DocView.GetFirstDocument("Daily Report"
Set doc1 = doc.GetFirstItem("$FILE"
doc1.ExtractFile ("$FILE" 'This part is where the program hangs "Object does not support this property."
Can anyone lead down the right path? What am I doing wrong?
Thanks in advance,
Thanks,
crpjaviman