SWT OLE doVerb makes application menu disappear [message #897338] |
Mon, 23 July 2012 12:10  |
Eclipse User |
|
|
|
Hi all,
I have the following problem.
I am using OleControlSite in an RCP app. When I call control.doVerb on the OleControlSite, the application menu disappears.
I get the menu at the end of the process, but I cannot make it visible.
If I dispose the oleControlSite then I get the menu, but then I lose the Excel sheets.
has anyone encountered such a problem. I have google for a solution and someone else has had a similar problem. But I have found no solution.
so any ideas?
Binko
|
|
|
|
|
Re: SWT OLE doVerb makes application menu disappear [message #1027205 is a reply to message #988965] |
Tue, 26 March 2013 13:40  |
Eclipse User |
|
|
|
Hi,
I have the follwoing problem.
I have created a table in an emebedde Word document.
Then I get its rows for processing in the following method.
/**
* Returns the row in the table with the given index
* @param tableVar - table variant
* @param rowIndex - row index
* @return rowVariant - row Variant
* @throws OleException
*/
public static Variant getRow(Variant tableVar, int rowIndex) throws OleException {
OleAutomation tableAuto = tableAuto = tableVar.getAutomation();
OleUtils.printAutomation(tableAuto);
Variant rowsVar = null;
while (rowsVar == null){
rowsVar = tableAuto.getProperty(101/*Rows*/);
}
OleAutomation rowsAuto = rowsVar.getAutomation();
Variant rowVar = rowsAuto.invoke(0/*Item*/, new Variant[]{new Variant(rowIndex)});
return rowVar;
}
Sometimes it functions for over 70 rows, sometimes the Word application crashes and rowsVar is returned as null.
The OLE Exception is the usual 0x80020009 (Exception).
How can I prevent the Word application from crashing?
Any ideas?
|
|
|
Powered by
FUDForum. Page generated in 0.03405 seconds