Based on the search results, there is no direct functionality in LibreOffice Impress that allows for variables in hyperlinks to local files. However, there are several related approaches and workarounds that might help achieve similar functionality:
Relative Links Instead of Variables
LibreOffice allows you to use relative links instead of absolute paths, which provides some flexibility when moving documents between computers or locations. You can configure LibreOffice to create relative hyperlinks by going to Tools > Options > Load/Save > General and specifying the "Save URLs relative to" field[1][6]. This is useful when:
- Your documents are on a cloud service with different paths on different computers[3][18]
- You want links to work regardless of the drive letter or absolute path
- You're creating content that will be moved to another location
Relative linking is only possible when both the document you're working on and the link destination are on the same drive[1].
Creating Hyperlinks in Impress
To add hyperlinks in LibreOffice Impress:
- Select the text or shape you want to make clickable
- Press Ctrl+K or click the Hyperlink icon in the Standard toolbar
- Enter the link address in the dialog box that appears
- Click OK to apply the hyperlink[7][17]
This works for both text and shapes, allowing you to make various elements clickable.
Potential Workarounds
While not directly supporting variables, you might be able to use:
-
BASIC Macros: Similar to how BASIC can be used to set hyperlinks programmatically in Calc[12], you might develop a macro solution for Impress.
-
Formula-based Approaches: In Calc, functions like ADDRESS() or CELL() can create dynamic references[16]. Although these specific functions aren't available in Impress, this approach demonstrates the concept of dynamic references.
-
LibreOffice 6.2 and Later: Beginning with version 6.2, LibreOffice improved support for relative paths in hyperlinks, making them work relative to the saved file's path[18]. This allows for syntax like =HYPERLINK("relative/path/to/file") in Calc, which might have parallel functionality in Impress.
The lack of direct variable support in hyperlinks is a limitation in Impress, but using relative paths can offer a partial solution by making links more portable across different systems.