Hi,
I have created a new menu option in our database that creates reports in excel and word, using automation. I use commands like this:
Public oContract
* Create instance of class
oContract=CreateObject("emsOfficeClass.Office")
* Run the report and show in Excel
oContract.ContractPortfolioReport()
This generates an instance of a report in Excel. However if the user runs the report again, the old report gets destroyed, because variable oContract is used again. What I want to know is that once the report is created, is there any way to remove the reference to Excel, without actually losing the document that has been created?
I know I could save the document, close it and use ShellExecute to open it again, but ideally I would like the user to make the choice of saving the document or not.
I have created a new menu option in our database that creates reports in excel and word, using automation. I use commands like this:
Public oContract
* Create instance of class
oContract=CreateObject("emsOfficeClass.Office")
* Run the report and show in Excel
oContract.ContractPortfolioReport()
This generates an instance of a report in Excel. However if the user runs the report again, the old report gets destroyed, because variable oContract is used again. What I want to know is that once the report is created, is there any way to remove the reference to Excel, without actually losing the document that has been created?
I know I could save the document, close it and use ShellExecute to open it again, but ideally I would like the user to make the choice of saving the document or not.