Index is less than 0 or more than or equal to the list count. Parameter name: index Actual value was 4. ASPOSE.SLIDES Java

Hi,


I have four slides in a presentation and I’m trying to get the last slide (which is slide 4) using get_Item(4); the error Index is less than 0 or more than or equal to the list count. Parameter name: index Actual value was 4. keeps popping up. Can I not use the get_item method to get the last slide in a PPTX?

I’m using PresentationEx.

Many thanks

Hi Jide,

Thank you for the details.

Well, Aspose.Slides uses 0 based indexes i.e. first slide is at index 0, 2nd slide at index 1 and so on. So, in your case, you need to pass 3 as index to get_Item() method to get forth slide. Please try it and in case you face any issue, please let us know.

Thanks & Regards,

Many thanks Owais, I’ll give that a go.