Reputation: 189
I have an agent in lotus notes which sends a mail with an attachment. Now this attachment is a csv file which has some values exported from a view. When this agent runs on a server, it should first place the file in a directory on the server and export the values of the view to the file and then send this file as an attachment in the mail. Now I first placed an empty file in this path "E:\ABC.CSV". When the agent runs, it must open this file on the server and then export the contents of the view to this file. We have used the below code to open the file
datafileNum = FreeFile()
Open datafileName For Output As datafileNum
where datafileName has the path to the file and the file name like E:\ABC.CSV. But when the agent encounters this line, it shows an error "Unable to open file". Please guide me as to why this error shows up and what can be done to solve this error.
Upvotes: 0
Views: 1562
Reputation: 11
Once I have similar issue, it turns out the signer of the agent must be included in the "Sign or run unrestricted methods and operations" and "Sign agents to run on behalf of someone else" fields. Agent security level 2 is enough but try with 3 if not.
I just have no enough reputation to add comment to previous answer :-)
Upvotes: 1
Reputation: 5429
Most likely your issue is related to agent security level. Could you change it to 2 or 3 (do not remember which one is enough to deal with files).
Upvotes: 4