I want to save an OLE Excel Object (MS Excel 2000 format) within a Lotus Notes document to make it available to MAC and Browser Users. After I attached it to a new Notes document MS Excel 2010 does not open it correctly. The file itself seems to be somehow valid, as I can detach and preview it with IE or Windows Explorer or even with the Lotus Notes preview. Only MS Excel 2010 is somehow unable to display the Excel document.
Here my code to extract the OLE file to file system:
dirLN = s.GetEnvironmentString("Directory",True)
subdirLN = "\"
Select Case dokArt
Case "Excel"
anhangLN = "anhang.xlsx"
Case "PowerPoint"
anhangLN = "anhang.pptx"
Case "Word"
anhangLN = "anhang.docx"
Case Else
Exit function
End Select
Set rtitem = doc.GetFirstItem("Body")
For i = 0 To UBound(rtitem.EmbeddedObjects)
Set objDoc = rtitem.EmbeddedObjects(i)
dateiLN =dirLN+subdirLN+anhangLN
Set oHandle = objDoc.Activate(False)
Call oHandle.savecopyAs(dateiLN)
Next
and this is how I attach it back to a document
'Anhang anhängen
Set rtItem = New NotesRichTextItem(doc,"Body")
Call rtItem.Embedobject(1454, "", dateiName)
What can I do to save the Excel file in the correct format ? I tried several ways, but I could not find any alternative to the 'savecopyas' method within the handle.