Hello
I may have to ask this on a relevant Eclipse forum for a definitive answer, but if possible I would like to find out whether there is anything in the Expeditor customisation that could contribute to the state in which Excel, Word and PowerPoint files open.
I have used the following articles as the basis for my trial code:
http://www.vogella.de/articles/EclipseMicrosoftIntegration/article.html
I used this to give me the basis for creating a new Office doc, except that I created a ClientServices project rather than a normal plugin.
I got the info on how to open an existing Office document from:
http://www.eclipse.org/articles/Article-ActivexSupportInSwt/index.html
The code snippets for opening is as follows:
OleFrame frame = new OleFrame(parent, SWT.NONE);
// Next 3 for opening a file
File file = new File("E:\\TEMP\\HelloWorld.doc");
site = new OleClientSite(frame, SWT.NONE, file);
int ret = site.doVerb(OLE.OLEIVERB_PRIMARY);
or
// Next statement for creating a new file
// site = new OleClientSite(frame, SWT.NONE, "Word.Document");
When the view opens with a new or existing doc, instead of being full page, there is only the top line visible. You have to do some tricky grabbing with the mouse to drag the file to full screen. Ppt is even worse - you have to click in the presentation and then drag that. This state of affairs would not be acceptable to end users. Is it possible to get the doc to fill the view when it opens?
The other main issue concerns opening an existing Office doc. I had to use a different doVerb value for each type to get the file to open so that the document was usable:
Word seems tolerant of OPEN and INPLACEACTIVATE as well as PRIMARY.
Excel only shows the whole file when using OPEN (but there is a separate excel window floating behind Expeditor client only showing one cell), with other doVerb values, Excel only shows one cell!
PowerPoint always opens in screen-show mode, except when using INPLACEACTIVATE.
Not much consistency here.
The second article above, gives some detail on what seem to be more advanced ways to interact with Office docs (Exec command and IDispatch). Do I have to get to grips with these to get acceptable behaviour?
Regards, John