Free Support Forum - aspose.com

Failure On Extract 1 Slide From Presentation

Hi Could I ask to you that What is the solution of my stuff?

when i extract a slide from presentation then it not done properly i used

GetSlideByPosition(1); it gives garbage slide

so give me sln plz...

Dear Chintan,

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for considering Aspose.Slides

C#

Presentation pres=new Presentation();

Slide sld=pres.GetSlideByPosition(1);

VB.NET

Dim pres as Presentation

Dim sld as Slide

pres=New Presentation()

sld=pres.GetSlideByPosition(1)

For more information, please see Programmer’s Guide here.

http://www.aspose.com/documentation/file-format-components/aspose.slides-for-.net-and-java/programmers-guide.html

And Working with Presentation

http://www.aspose.com/documentation/file-format-components/aspose.slides-for-.net-and-java/working-with-presentation.html

Thanks a lot, this is the only site where i got instant reply

now

i have used

Presentation pc = new Presentation("D:\\Mainsource.ppt");

Slide slide = pc.GetSlideByPosition(1);

Slide sCopy = pc.CloneSlide(slide,1);

Presentation cp = new Presentation("D:\\source.ppt");

cp.CloneSlide(sCopy,0);

cp.Write("D:\\123.ppt");

One more thing is that How can i copy one slide from Presentation and save it only that slide into another Presentation (which will contain only clone slide, will not contain any other existing slide)

in short i want to copy a slide from Presentation 1 and save only that slide into Presentation 2

i use asp.net 2005 with C#.

help me plz...

thanks again

You can clone slide into the same presentation and into another presentation. Please see Cloning a Slide at this link, that discusses both methods.

http://www.aspose.com/documentation/file-format-components/aspose.slides-for-.net-and-java/cloning-a-slide.html

Further, Presentation.GetSlideByPosition(nPosition) should be passed any integer that is within this range

1<= nPosition <= Presentation.Slides.LastSlidePosition

Exactly MSFaiz !! I Have Got IT,

Thanks u vry much ! ...