How to add hyperlink to concrete slide inside presentation using c#?
For now I have found how to Hyperlink to a site:
TextRange.ActionSettings[Microsoft.Office.Interop.PowerPoint.PpMouseActivation.ppMouseClick].Hyperlink.Address = “http://www.google.com”;
and found options to Last/First/Next
TextFrame.TextRange.ActionSettings[PpMouseActivation.ppMouseClick].Action = PpActionType.ppActionFirstSlide;
but not to slide4
If you add the setting manually in PowerPoint then ask it what the setting is, it’ll tell you. For example, add a link to Slide 4 to a text box, make sure the text box is selected and run this:
The result, a blank line (no hyperlink address) and a subaddress of:
259 is the SlideID
4 is the SlideIndex
“Title of slide 4” is the title text on slide 4
I’m fairly sure the ID and Index are necessary; the title is not. For example to set a link to slide 3 in the same presentation:
Doing it in c# … left as an exercise for the reader.