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.
