You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Kumar <ch...@rediffmail.com> on 2006/07/14 09:49:36 UTC

How to store the Modified slide back into ppt

Hi,
Want to replace a partucular text string in a slide, I could able get the 
string and modify it. But how can I saveback the slide into the PPT. I am 
trying out the following..

else if(shp[j] instanceof TextBox){

TextBox textShape = (TextBox)shp[j]; 
String mesg = textShape.getText();
                       if(mesg.equalsIgnoreCase("original")){    		
		textShape.setText("replaced text");	
}
             /*	FileOutputStream outFile = new FileOutputStream
("C:/Test/IndividualSlideProject/Demo1samp.ppt");
	ss.write(outFile);
	outFile.close();*/

}

With the commented the entire file is replacing with the present slide, erasing 
the header information.

So is there any procedure to save the changes back into the ppt, having said 
that the slide can be at anywhere in the ppt.
Thanks,
Kumar



---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/


Re: How to store the Modified slide back into ppt

Posted by Nick Burch <ni...@torchbox.com>.
On Fri, 14 Jul 2006, Kumar wrote:
> With the commented the entire file is replacing with the present slide, 
> erasing the header information.
>
> So is there any procedure to save the changes back into the ppt, having 
> said that the slide can be at anywhere in the ppt.

Despite several attempts to read the above, I'm affraid I still can't 
figure out what's not working for you.

The process is:
* open a powerpoint file
* change some stuff
* write it out to a new file
* open that file in powerpoint
* marvel at your changes

At what point are things misbehaving?

Nick

---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/