Nick Burch <nick <at> torchbox.com> writes:

> 
> On Wed, 15 Nov 2006, Lokesh wrote:
> > How can change the text of notes in the powerpoint. if any one have 
> > solution, plz post me sample codes.
> 
> Same as with slides. Just get the TextRuns, and change them as required
> 
> Nick
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: poi-user-unsubscribe <at> jakarta.apache.org
> Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
> The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/
> 
> 


Hi,

I have my ppt with some slides and notes and I have to update the notes alone.
here is what I am doing. Plz correct me if I am wrong.

SlideShow ss = new SlideShow(new HSLFSlideShow(
                                        "slidshow.ppt"));
                                                
                        Slide[] slides = ss.getSlides();
                        Notes[] notes = ss.getNotes();

                        for (int i = 0; i < notes.length; i++) {
                                TextRun[] tr = notes[i].getTextRuns();          
                
                                for (int j = 0; j < tr.length; j++) {
                                        String tempStr = tr[j].getRawText();
                                        tr[j].setText(tempStr + " Lokesh ### ");
                                }
                        }

FileOutputStream out = new FileOutputStream(new File(
                                        "newslidshow.ppt"));
                        ss.write(out);
                        out.close();


:Lokesh




---------------------------------------------------------------------
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/

Reply via email to