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

Free Support Forum - aspose.com

CustomShowAction - how to read and write a custom show

Hi,

I’m looking for a way to create a custom slide show within a presentation that I’m creating using Apose.Slides
I was able to add a custom show, and create a link:
Presentation presentation = new Presentation();
NamedSlideShow customShow = presentation.NamedSlideShows.Add(“show1”);
customShow.SlideIds.Add(1);
customShow.SlideIds.Add(2);
customShow.SlideIds.Add(3);
                 presentation.Slides[0].Shapes[0].AddLink();</pre></div><div><br></div><div>however, I could not find a way to asign the "show1" into this link?</div><div>(how to set link.ActionType = CustomShowAction, and where is the property for the custom show name, "show1" ?)</div><div><br></div><div>To test this, I've created a simple ppt with custom show. reading it with aspose does return object in the namedslideshows collection, and a link with ActionType-CustomShowAction. however, again, where is the custom show name?</div>

Hi Eli,

I have worked over the requirements shared by you and like to share that you need to set the internal hyperlinks on slide text in order to apply custom actions to jump to desired slides. I have created a sample code for your convenience that will work with Aspose.Slides for .NET 14.7.0. Please try using this on your end to serve the purpose.

public static void AddHyperlink()

{
//Instantiate a Presentation class that represents a PPTX//Instantiate a Presentation class that represents a PPTX
Presentation pptxPresentation = new Presentation();

//Get first slide
ISlide slide = pptxPresentation.Slides[0];

//Add Empty Slide
pptxPresentation.Slides.AddEmptySlide(pptxPresentation.LayoutSlides[0]);

//Add an AutoShape of Rectangle Type
IAutoShape pptxAutoShape = slide.Shapes.AddAutoShape(ShapeType.Rectangle, 150, 150, 150, 50);

ITextFrame ITextFrame = pptxAutoShape.TextFrame;

//Add some text to the frame
ITextFrame.Paragraphs[0].Portions[0].Text = “Slide Two”;

//Set Hyperlink for the portion text
IHyperlinkManager HypMan = ITextFrame.Paragraphs[0].Portions[0].PortionFormat.HyperlinkManager;
HypMan.SetInternalHyperlinkClick(pptxPresentation.Slides[1]);
// HypMan.SetInternalHyperlinkMouseOver(pptxPresentation.Slides[1]);

//Save the PPTX Presentation
pptxPresentation.Save(“D:\Aspose Data\hLinkPPTX.pptx”, SaveFormat.Pptx);

}

Many Thanks,

Hi, thank you for your response.

I have no issues in creating links between slides. what I’m trying to do is to create a custom slide show, as stated in the original post.

For refference, I’m adding a simple slide show that shows this concept - 2 custom slide show, each link direct to one of them, after viewing all the slides it goes back to the original slide.

this PowerPoint feature is explained here: http://office.microsoft.com/en-gb/powerpoint-help/create-custom-shows-within-a-presentation-in-powerpoint-HA001034825.aspx

How could I do that using Aspose?

Hi Eli,

I have observed the presentation and regret to share that the requested support is presently unavailable in Aspose.Slides. I have created an issue with ID SLIDESNET-35714 in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be automatically notified once the support is available.

Many Thanks,