poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From MSB <markbrd...@tiscali.co.uk>
Subject Re: not able to get the correct Range object for the area inside the textbox
Date Thu, 11 Jun 2009 14:06:03 GMT

Have you tried creating a textbox with a placeholder - some text that you can
search for, maybe 'TextBox1' for example inside it and then trying to
replace that string of text? Again, I have not tried this but I would expect
that if you open a document, get the top level range from that, get a list
of Paragraph(s) from the Range and then work through each Paragraph, then
you should see a Paragraph object for the 'TextBox1' String returned to you.
If so, then it ought to be a matter of replacing this text and seeing what

With regard to your other question, no, I do not know how to access the
space inside the Textbox, sorry. HWPF is still an immature product that is
being developed and it may be - that is a may be - that it cannot currently
support the functionality you require.

Having said that, as soon as I have the time, I will play with some code to
see what happens. Sadly however, I cannot promise when this will be as I am
looking into another problem for a list member currently.


Mark B

tapaswini wrote:
> Thanks Mark for your suggestion. 
> I am able to get the Shape objects but problem is there is no method to
> set the text in the shape object. 
> Also, I am not able to get the correct Range object for the area inside
> the textbox. Please let me know how can I refer to the area inside a
> textbox so that I can modify the text. 
> I have full control over the template and can create placeholders. But I
> am not able to modify a piece of text which is inside a textbox. 
> Any suggestion will be very helpful. 
> Regards, 
> Tapaswini 

View this message in context: http://www.nabble.com/not-able-to-get-the-correct-Range-object-for-the-area-inside-the-textbox-tp23978886p23981984.html
Sent from the POI - User mailing list archive at Nabble.com.

To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org

View raw message