Can anyone help ? Our C++ code uses the Active X control to display our reports. We have the export button enabled on the toolbar & can export fine. We can even export directly into Word (without saving to a disk file first) if the PC has the u2dapp.dll
However, when we try to export through C++ code using the 'Export' method of the Report object, such as :-
VARIANT bPrompt; VariantInit(&bPrompt);
bPrompt.vt = VT_BOOL; bPrompt.boolVal = FALSE;
_bstr_t bsProg = "C:\\Program Files\\Microsoft Office\\Office\\winword.exe";
_bstr_t bsFile = "c:\\temp\\crtest.doc";
m_pIReport->ExportOptions->put_ApplicationFileName(bsProg);
m_pIReport->ExportOptions->put_DestinationType(crEDTApplication);
m_pIReport->ExportOptions->put_FormatType(crEFTWordForWindows);
m_pIReport->ExportOptions->put_DiskFileName(bsFile);
m_pIReport->Export(bPrompt);
We get an exception & then Word fires up with a blank document called 'Document1'
The text part of the comerror says 'Access Denied' - we have tried changing the destination to disk file & it works fine.
Any ideas ?
Spencer Window (not a joke name)
spencer.window@eastmidlandcomputers.ltd.uk
However, when we try to export through C++ code using the 'Export' method of the Report object, such as :-
VARIANT bPrompt; VariantInit(&bPrompt);
bPrompt.vt = VT_BOOL; bPrompt.boolVal = FALSE;
_bstr_t bsProg = "C:\\Program Files\\Microsoft Office\\Office\\winword.exe";
_bstr_t bsFile = "c:\\temp\\crtest.doc";
m_pIReport->ExportOptions->put_ApplicationFileName(bsProg);
m_pIReport->ExportOptions->put_DestinationType(crEDTApplication);
m_pIReport->ExportOptions->put_FormatType(crEFTWordForWindows);
m_pIReport->ExportOptions->put_DiskFileName(bsFile);
m_pIReport->Export(bPrompt);
We get an exception & then Word fires up with a blank document called 'Document1'
The text part of the comerror says 'Access Denied' - we have tried changing the destination to disk file & it works fine.
Any ideas ?
Spencer Window (not a joke name)
spencer.window@eastmidlandcomputers.ltd.uk