Date: prev next · Thread: first prev next last
2020 Archives by date, by thread · List index



Le 25/08/2020 à 13:09, Patrick a écrit :
N'y a-t-il pas la possibilité de récupérer l'URL du document et donc du dossier contenant le document et ainsi de construire le chemin complet d'une image en l'accolant au chemin du document ? Cela permettrait de pouvoir transmettre le document (et son dossier) à quelqu'un d'autre et ne pas avoir le chemin absolu qui dépend de ton installation.

Bien sûr,

On récupère l'url du document en cours avec ThisComponent.url. On obtient un truc du genre :

URLfichier = ThisComponent.url

On obtient un truc du genre :

file:///I:/TrvOpen/Projets/D%C3%A9pannages/JP/Document.odt (au format url, quel que soit le système)

le dossier uniquement avec :

URLdossier = Tools.Strings.DirectoryNameoutofPath(ThisComponent.url, "/")

La bibliothèque Tools fait partie des macros de LibreOffice.

Bonne soirée

--
Jean-Michel Coste


--
Envoyez un mail à users+unsubscribe@fr.libreoffice.org pour vous désinscrire
Les archives de la liste sont disponibles à https://listarchives.libreoffice.org/fr/users/
Privacy Policy: https://www.documentfoundation.org/privacy

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.