This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

mlreportgen.ppt.ExternalLink class

Package: mlreportgen.ppt

Hyperlink to location outside of presentation


Defines a hyperlink to a location outside of the presentation.


externalLinkObj = ExternalLink() creates an empty external link object.

externalLinkObj = ExternalLink(target,linkText) creates a hyperlink with the specified link text.

Input Arguments

expand all

URL of the link target, specified as a character vector.

The text to use for the link text.

Output Arguments

expand all

External link, returned as an mlreportgen.ppt.ExternalLink object.


expand all

URL of the link target, specified as a character vector. Specify the full URL (for example, include http://).

The text to use for the link text.

Format for the external link text, specified as an array of PPT style objects. You can specify these mlreportgen.ppt style objects:

  • FontFamily object

  • FontSize object

  • Bold object

  • FontColor object

  • Italic object

  • Underline object

ID for PPT API object, specified as a character vector. A session-unique ID is generated as part of object creation. You can specify an ID to replace the generated ID.

Tag for this PPT API object, specified as a character vector. The generated tag has the form CLASS:ID, where CLASS is the object class and ID is the value of the Id property of the object.

An example of a reason for specifying your own tag value is to make it easier to identify where an issue occurred during presentation generation.

This read-only property displays the URL of the link target of this hyperlink.


collapse all

Create a presentation.

import mlreportgen.ppt.*

slidesFile = 'myExternalLinkPresentation.pptx';
slides = Presentation(slidesFile);

add(slides,'Title and Content');

Create a Paragraph object and an ExternalLink object.

p = Paragraph('This is a link to the');
link = ExternalLink('',' MathWorks site.');

Append the external link to the paragraph, and replace the Content placeholder.


Close the presentation.


Open myExternalLinkPresentation.pptx. On a Windows® platform, you can open the presentation in MATLAB®:

if ispc