Hi,to all,
I want to use aspose.slides.dll to remove or add a slide in VB.net, my codes were as follow:
‘------ Codes Begin------
dim PPT as new aspose.slides
dim ppt as new aspose.slides.presentation(PPTFile)
Dim Pages=ppt.slides.count
on error resume next
ppt.slides.removeAt(n)
on error resume next
ppt.slides.addemptyslide
ppt.save(OutFile,Export.SaveFormat.ppt)
’-----Codes End-------
this codes didn’t work, and the OutFile is a empty file and cannot be opened by PowerPoint. Besides this, the value of ‘Pages’ is 0, not a valid value that is greater than 0.
who could tell me what is the correct codes for removing or adding one slide at a give position.
Thanks!
Chen
Hi, Muhammad Adnan,
Thanks for your response about my issue. I tried that codes, at the first time, It can return the correct Slides.count such as Slides.count=5, and the slide in the given index such as index=3 also can be removed by Slides.RemoveAt(index), and a new file has been sucessfully saved. Unfortunately, all the slides in the new file have been watermarked.
However, It is strange to me that the codes was run at the second,third,fourth ..... time again, the value of Slides.count is always equal to 1 not the correct one (=5), why this happen?
In addition, Could you tell me how much it is for the Aspose.Slides.dll? Maybe, the dll will work properly if it is not a trial version.
Thanks for your attention about my this issue.
Chen
Hi Ji,
I have observed your comments. I like to share that evaluation version also have some limitation. I request you to please share the source presentation and generated presentation so that we can investigate issue in details.
Best Regards,