Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Word crashes in getting table row(Word crashes in getting table row)
Word crashes in getting table row [message #1027214] Tue, 26 March 2013 17:54
Binko Binev is currently offline Binko BinevFriend
Messages: 20
Registered: June 2012
Junior Member
Hi all, I have the follwing problem.

I have embedded Word in an eclipse plugin.
The document contains a table. I am processing its rows and get them in the follwing methd

	 * 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();
		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 I get them sometimes the Word application crashes.
Then I get rowsVar as null, though it had a Dispatch in the preceding calls.
The rowIndex when it crashes is an arbitrary value - it is not the same every time.

Has someone any ideas what may be the problem?

[Updated on: Tue, 26 March 2013 17:56]

Report message to a moderator

Previous Topic:SWT OLE doVerb makes application menu disappear
Next Topic:Embed word starting with a specified file
Goto Forum:

Current Time: Mon Jun 25 12:19:30 GMT 2018

Powered by FUDForum. Page generated in 0.01871 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top