Hi,
I try to open an excel-document from a table ProdRoute via menuItem
(Display) atached to a form but I've only got a copy of the
Excelfile
and not the original file. I think the reason for that is
codestring >>> sysExcelWorkbook = sysExcelWorkbooks.add
(COMVariant);<<<<, but I am not sure.
This is my init() method on a form
void init()
{
Args callerArgs;
ProdRoute ProdRoute;
FileNameOpen File2Display;
COMVariant COMVariant;
SysExcelApplication sysExcelApplication;
SysExcelWorkbooks sysExcelWorkbooks;
SysExcelWorkbook sysExcelWorkbook;
SysExcelWorksheet sysExcelWorksheet;
super();
COMVariant = new COMVariant();
if (element.args())
{
callerArgs = element.args();
if (callerArgs.dataset() == tablenum(ProdRoute))
{
ProdRoute = callerArgs.record();
File2Display = ProdRoute.File2display();
}
}
sysExcelApplication = SysExcelApplication::construct();
sysExcelApplication.visible(true);
sysExcelWorkbooks = sysExcelApplication.workbooks();
COMVariant.bStr(File2Display);
sysExcelWorkbook = sysExcelWorkbooks.add(COMVariant);
sysExcelWorkbook.saved(true);
element.close();
}
}
Thanks!
| Yahoo! Groups Sponsor | |
|
|
Yahoo! Groups Links
- To visit your group on the web, go to:
http://groups.yahoo.com/group/development-axapta/
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

