Fail to Addautoshape

Hi

Now I am using 8.3 version dll in order to add the swf files to pptx and trying to export a html file to pptx file. I’m referring the follow link and Error is coming out:
An object reference is required for the nonstatic field, method, or property ‘Aspose.Slides.BaseSlide.Shapes.get’. What should I do if I want to export the html to a powerpoint file. And also adding the swf and image to the file?<

Hi Eric,

I have observed the issue statement shared by you. Can you please share the sample presentation with us so that I may investigate the issue further on my end to help you out. Please also try using Aspose.Slides for .NET 8.4.0 on your end first as well and if it works or not.

Many Thanks,

Hi Mudassir,


I have downloaded .NET 8.4.0, but still got an error on the AutoShape.
it said "Cannot implicitly convert type ‘int’ to ‘Aspose.Slides.Pptx.AutoShapeEx’ "

Thank you.
Eric

Hi Eric,

Thanks for your feedback. I have observed the sample code shared but have not been able to find the source HTML file. Please share the source HTML file used on your end so that I may proceed further with my investigation to help you further.

Many Thanks,

Hi Mudassir,


I still working on the html file, so I can’t attach the html file for your further investigation.
My html file will have some images and a table of some information. And may sometimes add a swf file on that.

Thanks,
Eric

Hi Eric,

Thanks for sharing the feedback. You can please work over the HTML file and when you will share that I will carry out the investigation on my end to help you further. I also like to share that Aspose.Slides only support importing the html text data from html file and does not support SWF file content in the presentation.

Many Thanks,

Hi Mudassir,


Is there any idea why I cannot use AddAutoShape into the AutoShape(Class)?

By the way, I cannot find those interface (ISlide , IAutoShape ) in the list.
Am I missing something on the program?
I have added,

using Aspose.Slides;
using Aspose.Slides.Pptx;

on the top of my program.
Sorry, I am quite new in C#.

Regards,
Eric

Hi Eric,

I have observed the requirements shred by you and suggest you to please try using following sample code to add AutoShape using Aspose.Slides for .NET 8.4.0.

PresentationEx pres = new PresentationEx();
SlideEx slide = pres.Slides[0];
slide.a
int id=slide.Shapes.AddAutoShape(ShapeTypeEx.Rectangle, 200, 200, 400, 400);

ShapeEx shape = slide.Shapes[id];

AutoShapeEx ashp = (AutoShapeEx)shape;

ashp.AddTextFrame(“text”);

pres.Save(“test.pptx”,SaveFormat.Pptx);


In order to add the AutoShape using Aspose.Slides for .NET 14.x.x, please visit the following documentation link to serve the purpose.

Manage and Manipulate Text and Text Frame Properties in .NET|Aspose.Slides Documentation

I hope the shared information will be helpful. If there is still an issue please feel free to share with us.


Many Thanks,