I have a Lotus Notes agent that search a database then return the result in Excel format. I got the correct result when I run the Agent using Trigger: On Event -> Action menu selection. But when I schedule to run the agent on the server, I received a different result. There are always 10 documents that keeps showing up on the first 10 rows of the Excel file and I cannot find those 10 documents in the database when I search for them manually in the database.
A few things that are different about the agent that I ran from my PC and from the server:
I have Office 2010 and the server has Office 2003, so the SaveAs method use different parameter
xlApp.ActiveWorkbook.SaveAs file_Path, 43 'for Office 2003 xlApp.ActiveWorkbook.SaveAs file_Path, 56 'for Office 2010
Running the agent from my PC saves the Excel file in my local hard drive. Running the agent from the server saves the Excel file on the path below:
C:\Windows\SysWOW64\config\systemprofile\Desktop\FileName.xls
My search statement:
search_Formula = {Form = "WORec" & SoftDelete != "Y" & WO_Dept="REPAIR" & } & _
{WO_Status != "Completed" & WO_Status != "Declined" & } & _
{@Like(WOBinNumber; "R%")}
I do not think any of those two differences cause the problem, but I do not know what else to try since I cannot step through the code when it is running on the server. Any help is appreciated.