|
Presentation presDoc = Presentation.Create(); ISlide slide1 = presDoc.Slides.Add(SlideLayoutType.Blank); ISlide slide2 = presDoc.Slides.Add(); ISlide slide3 = presDoc.Slides.Add(); ISlide slide4 = presDoc.Slides.Add(); IShape shape = slide1.Shapes.AddShape(AutoShapeType.Rectangle, 100, 20, 200, 100); //Set the slide index as hyperlink shape.SetHyperlink("3"); //Save the presentation to the file system presDoc.Save("Output.pptx"); //Close the presentation presDoc.Close(); |
Hi Ayaz,
Thank you for contacting Syncfusion support.
From the given details, we have found that your requirement is to set slide index number in the SetHyperlink method. Yes, you can set slide index number in the hyperlink field as a string and its working fine in our end. Kindly refer the below code example for your requirement.
Presentation presDoc = Presentation.Create();
ISlide slide1 = presDoc.Slides.Add(SlideLayoutType.Blank);
ISlide slide2 = presDoc.Slides.Add();
ISlide slide3 = presDoc.Slides.Add();
ISlide slide4 = presDoc.Slides.Add();
IShape shape = slide1.Shapes.AddShape(AutoShapeType.Rectangle, 100, 20, 200, 100);
//Set the slide index as hyperlink
shape.SetHyperlink("3");
//Save the presentation to the file system
presDoc.Save("Output.pptx");
//Close the presentation
presDoc.Close();
If you still facing the issue means, kindly share the complete sample along with the input document which will helpful us to provide you the appropriate solution at the earliest.
Please let us know if you have any further questions.
Regards,
Manikandan Ravichandran