Bit worried about this one and I've looked around and found lots of posts with similar problems, but not many of them have fixes.
Windows 2008 server and Domino running as a service (as it should). I've installed Office 2007 on the server to run an export. The code is executed from a web browser, but throws the following error when it tries to save the excel spreadsheet.
"OLE: Automation object error(213)"
It works fine when I try to run it from a Lotus Notes Client locally.
I've changed the Runtime security level to "2. Allow restricted operations without success", "1. Do not allow restricted operations" does not work at all, it fails much earlier and although I have tried using "3. Allo restricted operations with full administration rights", I don't think it's necessary, so have left it on "2. Allow restricted operations".
Code is as follows:
Dim session As NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument
Set session = New NotesSession
Set db = session.currentDatabase
Dim myobject As Variant
Dim mysheet As Variant
Set myobject = createObject("Excel.application.12") ' 12 for version 12 (2007) otherwise just Excel.application
Set mysheet = myobject.workbooks(1).Worksheets(1)
mysheet.name = "Review"
mysheet.cells(2, 5).value="Transfer to Excel"
mysheet.cells(2, 5).Font.Bold = True
Dim fmlaval As Variant
'Debugging shows that it fails on the next line
mysheet.SaveAs "C:\Downloads\test","56" ' "56" means 97 to 2003 version
Set myobject = Nothing ' free up the memory
Excel Automation object error(213) (Ross Chaplin 18.Apr.10)
Feedback number WEBB84N23H created by Ross Chaplin on 04/18/2010
. . Security and Domino access to Excel... (Ross Chaplin 18.Apr.10)
. . . . Excel File Format (Ross Chaplin 19.Apr.10)
. . . . . . Drowning here... (Ross Chaplin 22.Apr.10)
. . . . . . . . Similar issues (Dave Navarre 12.Jun.12)
. . . . . . . . . . Mine was far easier (Dave Navarre 14.Jun.12)
. . This worked for me (Beppe Bonetti 29.Apr.10)