| View previous topic :: View next topic |
| Author |
Message |
lexus56 General User

Joined: 01 Nov 2008 Posts: 20
|
Posted: Sun Nov 02, 2008 12:29 am Post subject: Conclusion of the text since the set position. |
|
|
It is necessary to deduce the text after a certain label in the text, but to make it it does not turn out in any way.
| Code: |
arg = new Object[0];
Object oText = Invoke(oComponent, "getText", BindingFlags.InvokeMethod, arg);
//============================================================================
Object SearchDesc = Invoke(oComponent, "createSearchDescriptor", BindingFlags.InvokeMethod, arg);
arg = new object[1];
arg[0] = "#desc#";
Invoke(SearchDesc, "searchString", BindingFlags.SetProperty, arg);
arg = new object[1];
arg[0] = SearchDesc;
Object found = Invoke(oComponent, "findFirst", BindingFlags.InvokeMethod, arg);
found.goRight(6,false);
arg = new object[3];
arg[0] = found;
arg[1]="ку-ку";
arg[2]=false;
Invoke(oText, "insertString", BindingFlags.InvokeMethod, arg);
|
Where is error in this code |
|
| Back to top |
|
 |
lexus56 General User

Joined: 01 Nov 2008 Posts: 20
|
Posted: Mon Nov 03, 2008 4:54 am Post subject: Re: Conclusion of the text since the set position. |
|
|
| lexus56 wrote: | It is necessary to deduce the text after a certain label in the text, but to make it it does not turn out in any way.
| Code: |
arg = new Object[0];
Object oText = Invoke(oComponent, "getText", BindingFlags.InvokeMethod, arg);
//============================================================================
Object SearchDesc = Invoke(oComponent, "createSearchDescriptor", BindingFlags.InvokeMethod, arg);
arg = new object[1];
arg[0] = "#desc#";
Invoke(SearchDesc, "searchString", BindingFlags.SetProperty, arg);
arg = new object[1];
arg[0] = SearchDesc;
Object found = Invoke(oComponent, "findFirst", BindingFlags.InvokeMethod, arg);
found.goRight(6,false);
arg = new object[3];
arg[0] = found;
arg[1]="ку-ку";
arg[2]=false;
Invoke(oText, "insertString", BindingFlags.InvokeMethod, arg);
|
Where is error in this code |
Please help me!!!! |
|
| Back to top |
|
 |
jrkrideau Super User

Joined: 08 Aug 2005 Posts: 6733 Location: Kingston ON Canada
|
Posted: Mon Nov 03, 2008 6:14 am Post subject: |
|
|
You might want to move this question to the Macros and API forum. The readers there are more likely to understand the problem.
However you should tell them what is happening when you run this code.
Also what OS and what version of OOo are you using? _________________ jrkrideau
Kingston ON Canada
Currently using Windows 7 & OOo 3.4.0 and Ubuntu 12.04 & LibreOffice 3.5.2.2 |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|