API reference / Common / Engine types / TextHyperlink
Interface: TextHyperlink
The link a span's text or a shape-tree element follows — where it points, what following it does, its tooltip, and how it is followed.
An element's links are the same CT_Hyperlink, a:hlinkClick and a:hlinkHover in its a:cNvPr, and ride on its ShapeNonVisualProperties.
One property for both spellings. DrawingML writes it on each run, a:hlinkClick in a:rPr (and in a:endParaRPr and a:defRPr, which take it the same way). docx writes it as w:hyperlink, an element around the runs it covers — a container in w:sdt's own content group whose whole payload is a few attributes scoped over its runs, as w:dir and w:bdo scope a direction — and import sets it on each of those runs. A docx save regroups the runs carrying one link into one element, nesting it against a control by their extents.
a:hlinkClick keeps its two halves apart, as the file does: r:id says where, @action says what to do, and either may be absent — a jump to the next slide names no relationship (r:id=""), a plain link no action. docx has no @action, nor the fields after history.
Properties
| Property | Description |
|---|---|
target?TextHyperlinkTarget | Where the link points: r:id's relationship resolved, or docx's w:anchor. None where it names none — what a link whose action needs no place has. |
action?TextHyperlinkAction | a:hlinkClick@action — what following the link does; None for a plain link, which goes to its target. |
tooltip?string | @tooltip — the hover tooltip. |
targetFrame?string | @tgtFrame — the HTML frame the target opens in. |
location?string | w:hyperlink@docLocation — a location inside the target that has no bookmark. |
history?boolean | @history — whether following it adds the target to the viewed hyperlinks. Each dialect's own default where the file says nothing: off for docx, on for DrawingML (§17.16.22, §21.1.2.3.5). |
invalidUrl?string | a:hlinkClick@invalidUrl — the URL the writing application found invalid. |
highlightClick?boolean | a:hlinkClick@highlightClick — whether a click highlights the link. |
endSound?boolean | a:hlinkClick@endSnd — whether following the link stops every sound playing. |