<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to 4: Word selection issue</title><link>https://sourceforge.net/p/jcom/support-requests/4/</link><description>Recent changes to 4: Word selection issue</description><atom:link href="https://sourceforge.net/p/jcom/support-requests/4/feed.rss" rel="self"/><language>en</language><lastBuildDate>Wed, 22 Sep 2004 04:40:08 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/jcom/support-requests/4/feed.rss" rel="self" type="application/rss+xml"/><item><title>Word selection issue</title><link>https://sourceforge.net/p/jcom/support-requests/4/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Hi Philippe, &lt;/p&gt;
&lt;p&gt;the problem is that I have no idea how to create a&lt;br /&gt;
selection-object! &lt;br /&gt;
Each time I get a JCom-Exception. &lt;/p&gt;
&lt;p&gt;Here is the code where I tried to create a&lt;br /&gt;
selection-object: &lt;/p&gt;
&lt;p&gt;First trial/ test: &lt;br /&gt;
IDispatch wordselection = (IDispatch)&lt;br /&gt;
wdDocument.get("Selection"); &lt;/p&gt;
&lt;p&gt;Second trial/ test: &lt;br /&gt;
IDispatch wordContent1 = (IDispatch)&lt;br /&gt;
wdDocument.get("Content"); &lt;br /&gt;
IDispatch wordselection = (IDispatch)&lt;br /&gt;
wordContent1.get("Selection"); &lt;/p&gt;
&lt;p&gt;Third trial/ test: &lt;br /&gt;
IDispatch wdSelections =&lt;br /&gt;
(IDispatch)wdApp.get("Selection"); &lt;/p&gt;
&lt;p&gt;But I always get a JCom Exception!!!!!! &lt;br /&gt;
Where is the error?? &lt;/p&gt;
&lt;p&gt;---------------------------------------------------------------------------------------------------------------&lt;/p&gt;
&lt;p&gt;And when I should have the selection-object, can I do&lt;br /&gt;
the EndKey-Method?       &lt;br /&gt;
like this? &lt;/p&gt;
&lt;p&gt;Object[] macroEndKey = ; &lt;br /&gt;
macroEndKey = new Object[1]; &lt;br /&gt;
macroEndKey[0]= 8; &lt;br /&gt;
wordselection.method("run", makroEndKey); &lt;br /&gt;
_________________________________________________________________&lt;/p&gt;
&lt;p&gt;And can I use the InsertFile-Methode in a&lt;br /&gt;
selection-Object to insert several documents in the&lt;br /&gt;
first document?????? &lt;br /&gt;
like this? &lt;/p&gt;
&lt;p&gt;Object[] insertArray1 = new Object[]{ &lt;br /&gt;
hilf, // name of the next document &lt;br /&gt;
new String(""), &lt;br /&gt;
new Boolean(false), &lt;br /&gt;
new Boolean(false), &lt;br /&gt;
new Boolean(false), &lt;br /&gt;
};*/ &lt;br /&gt;
wordselection.method("run",insertArray1); &lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Wed, 22 Sep 2004 04:40:08 -0000</pubDate><guid>https://sourceforge.netead5b6d345ef27e7aac30153d5f2b28a28ececaa</guid></item></channel></rss>