Package: mlreportgen.ppt
Superclasses: mlreportgen.ppt.Text
Hyperlink to location outside of presentation
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.
HandleCompatible | true |
ConstructOnLoad | true |
For information on class attributes, see Class Attributes.
Target
— URL of link target''
(default) | character vector | string scalarURL of the link target, specified as a character vector or string scalar.
Specify the full URL. For example, include
http://
.
Content
— Link text''
(default) | character vector | string scalarLink text, specified as a character vector or string scalar.
Bold
— Whether to use bold for link text[]
(default) | true
| false
Whether to use bold for the link text, specified as
true
or false
. A setting of
true
renders text in bold.
Font
— Font family for link text[]
(default) | character vector | string scalarFont 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.
ComplexScriptFont
— Font family for complex scripts[]
(default) | character vector | string scalarFont 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, for rendering text.
FontColor
— Font color for link text[]
(default) | character vector | string scalarFont color for the link text, specified as a character vector or string scalar that consists of a CSS color name or hexadecimal RGB value.
For a list of CSS color names, see https://www.crockford.com/wrrrld/color.html.
To specify a hexadecimal RGB format, use #
as
the first character and two-digit hexadecimal numbers for the red,
green, and blue values. For example, '#0000ff'
specifies blue.
FontSize
— Font size for link text[]
(default) | character vector | string scalarFont size for the link text, specified as a character vector or string
scalar that consists of a number followed by a unit of measurement. For
example, '11pt'
specifies 11 points. Valid abbreviations
are:
px
— pixels (default)
cm
— centimeters
in
— inches
mm
— millimeters
pc
— picas
pt
— points
Italic
— Whether to use italic for link text[]
(default) | true
| false
Whether to use italic for the link text, specified as
true
or false
. A setting of
true
renders text in italic.
Strike
— Strikethrough style for link text[]
(default) | 'single'
| 'none'
| 'double'
Strikethrough style for the link text, specified as one of these values:
'single'
— Single horizontal line
'none'
— No strikethrough line
'double'
— Double horizontal line
Subscript
— Whether to display link text as a subscript[]
(default) | true
| false
Whether to display the link text as a subscript, specified as
true
or false
. A setting of
true
renders text as a subscript.
Superscript
— Whether to display link text as a superscript[]
(default) | true
| false
Whether to display the link text as a superscript, specified as
true
or false
. A setting of
true
renders text as a superscript.
Underline
— Underline style for link text[]
(default) | 'single'
| 'double'
| ...Underline style for the text, specified as one of these values:
Value | Description |
---|---|
'single' | Single underline |
'double' | Double underline |
'heavy' | Thick underline |
'words' | Only words underlined (not spaces) |
'dotted' | Dotted underline |
'dottedheavy' | Thick, dotted underline |
'dash' | Dashed underline |
'dashheavy' | Thick, dashed underline |
'dashlong' | Long, dashed underline |
'dashlongheavy' | Thick, long, dashed underline |
'dotdash' | Dot-dash underline |
'dotdashheavy' | Thick, dot-dash underline |
'dotdotdash' | Dot-dot-dash underline |
'dotdotdashheavy' | Thick, dot-dot-dash underline |
'wavy' | Wavy underline |
'wavyheavy' | Thick, wavy underline |
'wavydouble' | Wavy, double underline |
'none' | No underline |
Style
— Link text formatting[]
(default) | cell array of PPT format objectsLink 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('link text');
link.Style = [link.Style {Bold(true)}];
Children
— Children of this PPT API objectChild elements of this object, specified as a cell array of PPT objects. This property is read-only.
Parent
— Parent of this PPT API objectParent of this object, specified as a PPT object. This property is read-only.
Tag
— Tag for this PPT API objectTag for this PPT API object, specified as a character vector or string scalar. A
session-unique tag is generated 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.
Specifying your own tag value can help you to identify where an issue occurred during presentation generation.
Id
— ID for this PPT API objectID for this PPT API object, specified as a character vector or string scalar. A session-unique ID is generated as part of object creation. You can specify an ID to replace the generated ID.
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.
You have a modified version of this example. Do you want to open this example with your edits?