Read/write. The URL of the hyperlink. URL can be on http, https, mailto, or file scheme; others may work. Returns |None| if no hyperlink is defined, including when another action such as `RUN_MACRO` is defined on the object. Assigning |None| removes any action defined on the
(self)
| 207 | |
| 208 | @property |
| 209 | def address(self) -> str | None: |
| 210 | """Read/write. The URL of the hyperlink. |
| 211 | |
| 212 | URL can be on http, https, mailto, or file scheme; others may work. Returns |None| if no |
| 213 | hyperlink is defined, including when another action such as `RUN_MACRO` is defined on the |
| 214 | object. Assigning |None| removes any action defined on the object, whether it is a hyperlink |
| 215 | action or not. |
| 216 | """ |
| 217 | hlink = self._hlink |
| 218 | |
| 219 | # there's no URL if there's no click action |
| 220 | if hlink is None: |
| 221 | return None |
| 222 | |
| 223 | # a click action without a relationship has no URL |
| 224 | rId = hlink.rId |
| 225 | if not rId: |
| 226 | return None |
| 227 | |
| 228 | return self.part.target_ref(rId) |
| 229 | |
| 230 | @address.setter |
| 231 | def address(self, url: str | None): |
nothing calls this directly
no test coverage detected