To create a link to a location outside of a presentation, use
the mlreportgen.ppt.ExternalLink
constructor. Specify
the full URL of the link target and specify the link text as a character
vector. For example:
import mlreportgen.ppt.* slidesFile = 'myExternalLinkPresentation.pptx'; slides = Presentation(slidesFile); add(slides,'Title and Content'); p = Paragraph('This is a link to the '); link = ExternalLink('https://www.mathworks.com','MathWorks site.'); append(p,link); replace(slides,'Content',p); close(slides); if ispc winopen(slidesFile); end
To specify default formatting for the link text, use the Style
property
with format objects.
ExternalLink Object
Formatting | Format Object | Format Property |
---|---|---|
Font family |
| n/a |
Font family for complex scripts to handle locales |
| n/a |
Text color |
| n/a |
Font size |
| n/a |
Bold |
| n/a |
Italic |
| n/a |
Strike |
| n/a |
Underline |
| n/a |
Background color |
| n/a |