How to save an excel object to a document

I have an agent which generates an excel report and attaches that report, sends it to users.

Requirements

  1. The excel file cannot be saved

  2. The agent is scheduled.

I am able to generate the excel file but how do I attach this file to a document. I cannot use embedobject method because I have to specify a path. I cannot use envirn variable to get the path of the file coz its restriced.

How do I get the path of the file which is active in the background ?

Is there a way to include the excel file in the mail document without using embedobject(attachment) method.

Subject: How to save an excel object to a document

You will have to set up a predetermined location for your background agent to save the file. You can then attach the file to the document and then delete the saved file using the Kill method

Mike

Subject: RE: How to save an excel object to a document

Yes Mike, I Agree…

Thanks

John Cruz