Hi Team,
here my problem is I have two ppts named as test1.ppt and test2.ppt
In the test1.ppt the second slide contain ole Object(it is also one more ppt file with two slides).
but through my application ,i am trying to add slides randomly for thouse two ppts and i want to create new ppt.
Its workin fine using the following code
String destpath = propertyManager.getDestinationPPTPath() + ModuleConstants.FOLDER_SEPARATOR + form1.getSessionID() + ".ppt";
File destFile = new File(destpath);
destIOStream = new FileInputStream(destFile);
if (!destFile.exists())
{
flag = true;
common.createPPT(destFile);
}
source = new Presentation(sourceInputStream); //i am taking the source ppts means test1.ppt are ///test2.ppt
destination = new Presentation(destInputStream);// i am creating destination ppt intial its create
//a empty ppt after i am adding slides randomly
Slide slide = source.getSlideByPosition(index); // get the source ppt slide by position
TreeMap tMap = new TreeMap();
cloneSlide(slide,destination.getSlides().getLastSlidePosition()+1, destination,tMap);
fos = new FileOutputStream(DestFilePath);
destination.write(fos);
if(flag)
{
destination.getSlides().removeAt(0);
fos = new FileOutputStream(DestFilePath);
destination.write(fos);
flag = false;
}
bean.setImageName(ModuleConstants.EMPTY_STRING + (index));
bean.setImagePath(sourcePath);
bean.setImageIndex(destinationPPTList.size());
destinationPPTList.add(bean);
But My problem is when i am adding one more slide, after test1.ppt slide 2 i am not able to add any more slides to new generated ppt some null pointer exception is coming.
And
In which way i Know the particular slide contains any OLEObjects are not.
If i found the slide contains any OLEObject and which way i rename the OLEObject.
Thanks
Vjay
.