We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Error while opening a ppt using Aspose

Hi,

We are making use of Aspose slides for .Net to process/export the powerpoint from our application. Here we are getting an error when we trying to open a powerpoint template file using aspose.

Error Description:

Object reference not set to an instance of an object.

Exception: NullReferenceException.

Line of Code throwing error:

Presentation pres = new Presentation(strFilePath);

Here strFilePath contains the physical path of the powerpoint file.

The above mentioned error is occuring only with a particular powerpoint file. For rest of the file this line of code works fine. The powerpoint file causing error is attached here with.

Kindly review this and suggest some solution so that we can process attached ppt as well.

Regards,

Vikas

Dear Vikas,

I checked the ppt file with latest version of Aspose.Slides 2.9.2.0. It does not throw such exception. Please see the attached file and code

Presentation pres = new Presentation(@"D:\downloads\test19_1.ppt");

pres.Write("c:\\out.ppt");

Hi Shakeel,

I am making use of Aspose.slides 2.6.15.0 and i am still not able to process the file attached earlier (test19_1.ppt) and getting the same error.

However, when i tried to processed the ppt file provided by you (out.ppt), it went fine.

I am not able to understand the difference between the files and the corresponding behaviour.

Kindly provide some help.

Regards,

Vikas

Probably, it is because of a bug in the 2.6.15.0; you should upgrade yourself with latest version.

Could you provide me some more details about this bug in 2.6.15.0 causing this trouble and is there any work around for that.

For details, you will have to read about the bug fixes report of individual new releases of Aspose.Slides from this link.

http://www.aspose.com/community/files/51/file-format-components/aspose.slides/default.aspx

For example, this is the bug fix report of 2.6.15.0

http://www.aspose.com/community/files/51/file-format-components/aspose.slides/entry87459.aspx