Can someone explain how I can use matlab and activeX to add hyperlinks to powerpoint files?
This question explains how to create a powerpoint file using matlab:
This question shows how to use ActiveX to insert hyperlinks into Excel:
I tried to merge the two answers. I see that "Slide" objects have the ".Hyperlinks" attribute but there is no ".Add" method for Hyperlinks.
Here is the code I have so far:
ppt = actxserver('PowerPoint.Application');
template = 'link\to\template.pptx';
op = invoke(ppt.Presentations,'Open',template,,,false);
slide = invoke(op.Slides,'Item',1);
Please share another example. I would like the links to appear in a table.
sH = op.PageSetup.SlideHeight;
sW = op.PageSetup.SlideWidth;
table = invoke(slide.Shapes, 'AddTable', 1, 3, 0.05*sW, sH*.2, 0.9*sW, sH*.60);
table.Table.Cell(1,1).Shape.TextFrame.TextRange.Text = 'www.mathworks.com';