Hi Philippe,
the problem is that I have no idea how to create a
selection-object!
Each time I get a JCom-Exception.
Here is the code where I tried to create a
selection-object:
First trial/ test:
IDispatch wordselection = (IDispatch)
wdDocument.get("Selection");
Second trial/ test:
IDispatch wordContent1 = (IDispatch)
wdDocument.get("Content");
IDispatch wordselection = (IDispatch)
wordContent1.get("Selection");
Third trial/ test:
IDispatch wdSelections =
(IDispatch)wdApp.get("Selection");
But I always get a JCom Exception!!!!!!
Where is the error??
---------------------------------------------------------------------------------------------------------------
And when I should have the selection-object, can I do
the EndKey-Method?
like this?
Object[] macroEndKey = ;
macroEndKey = new Object[1];
macroEndKey[0]= 8;
wordselection.method("run", makroEndKey);
_________________________________________________________________
And can I use the InsertFile-Methode in a
selection-Object to insert several documents in the
first document??????
like this?
Object[] insertArray1 = new Object[]{
hilf, // name of the next document
new String(""),
new Boolean(false),
new Boolean(false),
new Boolean(false),
};*/
wordselection.method("run",insertArray1);