Documentation

This is machine translation

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

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

mlreportgen.ppt.ExternalLink class

Package: mlreportgen.ppt
Superclasses:

Hyperlink to location outside of presentation

Description

Defines a hyperlink to a location outside of the presentation.

Construction

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.

Properties

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.

Examples

expand 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('http://www.mathworks.com',' MathWorks site.');

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

append(p,link);
replace(slides,'Content',p);

Close the presentation.

close(slides);

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

if ispc
    winopen(slidesFile);
end

Was this topic helpful?