Main Content

mlreportgen.ppt.ExternalLink Class

Namespace: mlreportgen.ppt
Superclasses: mlreportgen.ppt.Text

Hyperlink to location outside of presentation

Description

Use an object of the mlreportgen.ppt.ExternalLink class to define a hyperlink to a location outside of the presentation.

The mlreportgen.ppt.ExternalLink class is a handle class.

Class Attributes

HandleCompatible
true
ConstructOnLoad
true

For information on class attributes, see Class Attributes.

Creation

Description

externalLinkObj = ExternalLink creates an empty mlreportgen.ppt.ExternalLink object.

externalLinkObj = ExternalLink(target,linkText) creates an mlreportgen.ppt.ExternalLink object with the Target property set to target and the Content property to linkText.

example

Properties

expand all

Target URL of link, specified as a character vector or a string scalar.

Attributes:

GetAccess
public
SetAccess
public
NonCopyable
true

Data Types: char | string

Link text, specified as a character vector or string scalar.

Attributes:

GetAccess
public
SetAccess
public
NonCopyable
true

Data Types: char | string

Whether to use bold for the link text, specified as a logical 1 (true) or 0 (false). When you specify:

  • 1 (true) — Render link text in bold.

  • 0 (false) — Render link text in regular weight.

Attributes:

GetAccess
public
SetAccess
public
NonCopyable
true

Data Types: logical

Font family for the link text, specified as a character vector or string scalar. Specify a font that appears in the font list in Microsoft® PowerPoint®. To see the font list, in PowerPoint, on the Home tab, in the Font group, click the arrow to the right of the font.

Attributes:

GetAccess
public
SetAccess
public
NonCopyable
true

Font family for complex scripts, specified as a character vector or string scalar. Specify a font family to use when substituting in a locale that requires a complex script, such as Arabic or Asian, to render text.

Attributes:

GetAccess
public
SetAccess
public
NonCopyable
true

Data Types: char | string

Font color for the link text, specified as a character vector or string scalar that contains a CSS color name or hexadecimal RGB value.

FormatValue
CSS color nameSpecify a CSS color name. For a list of CSS color names, see https://www.w3.org/wiki/CSS/Properties/color/keywords.
Hexadecimal RGB valueUse the format "#RRGGBB". Use # as the first character and two-digit hexadecimal numbers for the red, green, and blue values. You can use uppercase or lowercase letters.

Example: "red" specifies a red color using a CSS color name.

Example: "#0000ff" specifies a blue color using a hexadecimal RGB value.

Attributes:

GetAccess
public
SetAccess
public
NonCopyable
true

Data Types: char | string

Font size for the link text, specified as a character vector or string scalar that contains a number followed by a unit of measurement. For example, "11pt" specifies 11 points. Valid abbreviations are:

  • "px" — Pixels

  • "cm" — Centimeters

  • "in" — Inches

  • "mm" — Millimeters

  • "pc" — Picas

  • "pt" — Points

You can also specify pixels by omitting the unit. For example, "5" specifies 5 pixels.

Attributes:

GetAccess
public
SetAccess
public
NonCopyable
true

Data Types: char | string

Whether to use italic for the link text, specified as a logical 1 (true) or 0 (false). When you specify:

  • 1 (true) — Render link text in italic.

  • 0 (false) — Render link text as straight text.

Attributes:

GetAccess
public
SetAccess
public
NonCopyable
true

Data Types: logical

Strikethrough style for the link text, specified as one of these values:

  • "single" — Single horizontal line

  • "none" — No strikethrough line

  • "double" — Double horizontal line

Attributes:

GetAccess
public
SetAccess
public
NonCopyable
true

Whether to display the link text as a subscript, specified as a logical 1 (true) or 0 (false). When you specify:

  • 1 (true) — Render link text as a superscript.

  • 0 (false) — Render link text as regular text.

Attributes:

GetAccess
public
SetAccess
public
NonCopyable
true

Data Types: logical

Whether to display the link text as a superscript, specified as a logical 1 (true) or 0 (false). When you specify:

  • 1 (true) — Render link text as a superscript.

  • 0 (false) — Render link text as regular text.

Attributes:

GetAccess
public
SetAccess
public
NonCopyable
true

Data Types: logical

This property is ignored.

Attributes:

GetAccess
public
SetAccess
public
NonCopyable
true

Link text formatting, specified as a cell array of PPT format objects.

Add format objects by concatenating the existing value of the Style property with a cell array that contains the format objects that you are adding. For example:

link = mlreportgen.ppt.ExternalLink(3,"link text");
link.Style = [link.Style {Bold(true)}];

See Presentation Formatting Approaches.

Attributes:

GetAccess
public
SetAccess
public
NonCopyable
true

Data Types: cell

Parent of this object, specified as a PPT API object. A PPT API object must only have one parent.

Attributes:

GetAccess
public
SetAccess
private
NonCopyable
true

The class ignores this property.

Attributes:

GetAccess
public
SetAccess
private
NonCopyable
true

Tag, specified as a character vector or string scalar. The PPT API generates a session-unique tag as part of the creation of this object. 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. Use this value to help identify where an issue occurs during presentation generation.

Attributes:

GetAccess
public
SetAccess
public
NonCopyable
true

Data Types: char | string

Object identifier, specified as a character vector or string scalar. The PPT API generates a session-unique identifier when it creates the presentation element object. You can specify your own value for Id.

Attributes:

GetAccess
public
SetAccess
public
NonCopyable
true

Data Types: char | string

Methods

expand all

Examples

collapse all

Create a presentation that includes a link to a web site.

Create a presentation.

import mlreportgen.ppt.*
ppt = Presentation("myExternalLinkPresentation.pptx");
open(ppt);

Add a slide to the presentation.

slide = add(ppt,"Title and Content");

Create an mlreportgen.ppt.Paragraph object.

p = Paragraph("This is a link to the ");

Create an mlreportgen.ppt.ExternalLink object and append it to the paragraph.

link = ExternalLink("https://www.mathworks.com","MathWorks site");
append(p,link);

Replace the slide content with the paragraph.

replace(slide,"Content",p);

Close and view the presentation.

close(ppt);
rptview(ppt);

Here is the link in the generated slide.

Version History

Introduced in R2015b