iam able to successfully create excel reports on daily basis through agent create in lotusscript.In the same agent itself i have called a sendMail() function to send mails also .In this function first it should attach the excel report created and should send the mails to the desired recipents.
Problem is that excel reports able to create but in the sendMail () it is not able to attach that report .
I checked through lotusscript debugger and found that evrytime iam getting error on the same line(attchment line).
This line is:-
Set object = richItem.EmbedObject_
( EMBED_ATTACHMENT, “”, “Report - " +Cstr(Day(Now()))+”-“+Cstr(Month(Now()))+”-“+Cstr(Year(Now()))+”.xls")
Evertime i runs Debugger it skips when it reads this line and gives me error.
iam getting this error “NO RESUME 43”
What is it?Why iam getting it?The file is thr but why it is not picking up that file.
Subject: Problem is attaching Excel file through Lotusscript on sending mails.
Check that agent security is set to at least 2. Run restricted actions. Andt that signer-ID has right to run restricted lotusscript on server (Access to file system). And you probably need a resume in errorhandle.
Subject: Problem is attaching Excel file through Lotusscript on sending mails.
would need to see the code I think.
“No resume” usually means that there is an error trap that traps the error but then you haven’t told the code what to do next e.g. “Resume next”.
Also you don’t seem to be including the FILE PATH as well as the file name in your code. I think you need the file path e.g. c:\Docs\myreport.xls for the Embed attachment to work.
I think this is throwing the error and then the “No resume” is a red herring caused by your error trap.
Subject: Problem is attaching Excel file through Lotusscript on sending mails.
does this file exists on server? or its on your local macine?
Subject: RE: Problem is attaching Excel file through Lotusscript on sending mails.
Hi sir, it is in Server…iam talking about the server running at my home itself…what’s reason behind this ?
Subject: Problem is attaching Excel file through Lotusscript on sending mails.
Your file name is “Report - " +Cstr(Day(Now()))+”-“+Cstr(Month(Now()))+”-“+Cstr(Year(Now()))+”.xls")
Surely using ‘now’ means the filename will not be the as the file previously saved - if you used the same function to name the file, ‘now’ will have changed by the time you come to attach it.
I would calculate the file name and store it in a variable when creating, then use the variable to attach.
HTH
Subject: RE: Problem is attaching Excel file through Lotusscript on sending mails.
thnx Tim for suggestion,however the file name is same even though it created using now().e.g. file name is-“Report - 15-3-2009”
There is only 1 agent i have created what it is doing , first it creates the Excel report with current date ,access the directory location and saves it thr,then it calls a function sendMail()(which is called at the end of the agent before ‘exit sub’) that prepares the mail ,attaches the report(which is not doing currently) and send it to the designated persons.
So, i think thr is should be no doubt regarding change of filename saved b’coz both the creation as well as the mailing is done simultaneously.
thank you