Hi Rainer,
Thanks my problem is almost solved now. It is workign with
existing document edit. But now the problem is whenever I want to create a
new document and add a paragraph to that, it is throwing
java.io.FileNotFoundException: no such entry: "DocumentSummaryInformation"
Error getting property set with name SummaryInformation n
I read some previous threads and in one u have put a solution to add
writeProperties(pfs);
this line in write function of hwpfdocument....... but it is not
working.....
and add to that
if I want to copy one style from one document to the new one is there any
way out??
Thank you for your great help...
turja
Rainer Schwarze wrote:
>
> At 11:45 01.03.2007, turjabarua wrote:
>>Hi Rainer,
>> Actuall by saying style i wanted to say style of
>>character/paragraph , i.e if I open a document in ms word it shows just
>>beside font name like... normal, heading 1, heading 2....... etc .... When
I
>>parse one do file following code gives me style...... I think by seeing
>>this you'll understand what I want
>
> Hi Turja,
>
> ok. now I see :-)
> Maybe you want the ParagraphProperties.setIstd method. (Its actually
> defined in the super class PAPAbstractType - in case you're looking for
> it).
>
> As fas as I remember, the istd value is an index into the stylesheet
> entries. I believe that the first 10 entries are predefined styles and
> beginning with index 10, one gets the custom styles.
>
> If you want to set an existing stylesheet you should check the "contents"
> of the StyleSheet instance of the document. If you need to add a new
> style,
> you should check the Word file spec for the details of style handling.
>
>>this stylename I want to set ......
>
> (Just to be sure: If you want to set the name, you need to adjust the
> library and add a setter function to the StyleDescription class. But I'm
> not sure right now, whether this is all you need to do or if it requires
> more work. BTW: Most of the things which I did in HWPF ended up as
> "required more work"... :-) )
>
> Best wishes, Rainer
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> Mailing List: http://jakarta.apache.org/site/mail2.html#poi
> The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/
>
>
>
--
View this message in context:
http://www.nabble.com/Need-to-set-style-of-a-character-paragraph-using-HWPF-tf3325890.html#a9267795
Sent from the POI - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/