title: Unexpected result when Lotus Notes agent is ran on the server
body: <p>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.</p>
  
  <p>A few things that are different about the agent that I ran from my PC and from the server:</p>
  
  <ol>
  <li><p>I have Office 2010 and the server has Office 2003, so the SaveAs method use different parameter</p>
  
  <pre><code>xlApp.ActiveWorkbook.SaveAs file_Path, 43 'for Office 2003
  
  xlApp.ActiveWorkbook.SaveAs file_Path, 56 'for Office 2010
  </code></pre></li>
  <li><p>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:</p>
  
  <pre><code>C:\Windows\SysWOW64\config\systemprofile\Desktop\FileName.xls
  </code></pre></li>
  </ol>
  
  <p>My search statement:</p>
  
  <pre><code>search_Formula = {Form = "WORec" &amp; SoftDelete != "Y" &amp; WO_Dept="REPAIR" &amp; } &amp; _ 
      {WO_Status != "Completed" &amp; WO_Status != "Declined" &amp; } &amp; _
      {@Like(WOBinNumber; "R%")}
  </code></pre>
  
  <p>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.</p>