Hi folks,
I’m running into a strange problem with Embedded Objects, and I’m hoping
somebody can point me at the obvious thing to fix. Here’s the scenario:
On my form, docTempAttach is a global variable (NotesDocument). It was created
in the back end during QueryOpen, and has NOT been saved. It has a rich text
item, Attachments, in it (Created with LS) with a number of attachments that
were put there using RTItem.AppendRTItem.
In my code, I do the following (Full code available if you need it)
Set vAttachments = docTempAttach.GetFirstItem( “Attachments” )
…
Forall o In vAttachments.EmbeddedObjects
If o.Name = sName Then
'Attach the old version to the version control document
sFileName = "c:\notes\" & sName
Call o.ExtractFile( sFileName )
Call rtHistory.EmbedObject( EMBED_ATTACHMENT, "", "c:\notes\" + sName,
sName )
End If
End Forall
I think it looks about right, but I’m getting an error "Invalid or nonexistent
document (c:\notes\filename.xls)" on the ExtractFile call.
Script debugger tells me that o exists, and has type 1454 like it should. The
directory exists, and is empty.
Am I missing something really obvious here? I’m about to start frothing at the
mouth.
-Brendan