Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » How to hide confirmConversion dialog when open docx file with help 2003
How to hide confirmConversion dialog when open docx file with help 2003 [message #1009117] Thu, 14 February 2013 13:26 Go to next message
peter urvaev is currently offline peter urvaevFriend
Messages: 1
Registered: February 2013
Junior Member
I use eclipse swt in my application. It allows me open word files (doc, docx, rtf).
But I cannot hide "Confirm Conversion at Open" dialog programmaticaly when open docx file. Windows XP and Microsoft Word 2003 installed on machine.
In VBA this dialog hides when set property Application.Options.ConfirmConversions =false. Or sets property when open file: Documents.Open FileName:="file_path_name", ConfirmConversions = false. I set this property with help OleAutomation, but this doesn't work.
Bellow part of code that I use:
        shell = SWT_AWT.new_Shell(SwtHelper.display, canvas);
        shell.setLayout(new FillLayout());
        try {
            frame = new OleFrame(shell, SWT.NONE);
            clientSite = new OleClientSite(frame, SWT.NONE, "Word.Document", file);
        } catch (SWTException e) {


How I can fix it?

[Updated on: Fri, 15 February 2013 04:20]

Report message to a moderator

Re: How to hide confirmConversion dialog when open docx file with help 2003 [message #1027250 is a reply to message #1009117] Tue, 26 March 2013 19:02 Go to previous message
Binko Binev is currently offline Binko BinevFriend
Messages: 20
Registered: June 2012
Junior Member
I use similar code to open afile in OLE, but I do not get these messages.

I have a problem with getting a row in a table.
Sometimes it works, sometimes it does not.

This is the 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();
		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;

Any ideas?

Sorry for disturbing, just thought that you may have encountered a similar problem.
Previous Topic:OleFrame&OleClientSite for Excel
Next Topic: NoSuchMethodError: org.eclipse.swt.internal.ole.win32.COM
Goto Forum:

Current Time: Sun Apr 22 18:42:06 GMT 2018

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

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