How to hide confirmConversion dialog when open docx file with help 2003 [message #1009117] |
Thu, 14 February 2013 08:26  |
Eclipse User |
|
|
|
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);
clientSite.doVerb(OLE.OLEIVERB_SHOW);
} catch (SWTException e) {
}
How I can fix it?
[Updated on: Thu, 14 February 2013 23:20] by 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 15:02  |
Eclipse User |
|
|
|
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();
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;
}
Any ideas?
Sorry for disturbing, just thought that you may have encountered a similar problem.
|
|
|
Powered by
FUDForum. Page generated in 0.03833 seconds