How to view 'full path' of open document?

You are right, of course, @Lupp. And I am sorry. I was “googling” for an extension to solve the problem and this item from AskLO came up – couldn’t resist making my comment. I shouldn’t have. Sorry.

Thanks very much for the code. I will try that.

I just assigned the above macro to the ‘Activate Document’ event via >Tools>Customize and saved the setting for all LibreOffice. It works for me as expected, and I consider to work permanently with it.
However, I cannot check with different OS, and I don’t work in an environment with any specialties.

Lupp- that is NOT a “simple” answer. And as the problem is so undemanding, it is disappointing that we even have to discuss the issue. I can’t think of another app I use that doesn’t have this “feature” easily available. I’m toying with using Libre Office. If you want to “grow” the community, YOU encourage the developers. I’ve just waste 20 minutes with log in hassles. And I am not new, or inexperienced. Or impressed.

Without any consideration of the “comment” by @MSPhobe (who declared that @Lupp must do anything beyond trying to share their knowledge on this user-to-user site), just noting that there’s the related Location clickable link in File|Properties as of version 7.2.

I will suppress this time my tendency to also be phobic concerning this or that.

I can well understand the desire to see the full URL / location / other complete information in the title bar. of the ContainerWindow. (In rare cases there may be need to abbrviate it. I won’t plea for impossible things.)

The (load) URL windowlet is a kind of a surrogate, but needs to be enabled specifically for every document type, and can’t be adapted in width. (I would recommend to enable it anyway, and also to make this the default.) The DocumentProperty doesn’t even look like a surrogate to me.

Why suppress information? That’s MS doctrine, imo.

I surely dont know the lots of applications @MSPhobe knows, but some (to me) relevant ones like 7zip and Notepad++ actually show the full path. What’s bad about that.? LibO also should show, not hide.

There is a request for enhancement Add an option to show the full path in the window title.. Please add you comment.

As I already commented in the other thread under not too rare circumstances the title bar might not be wide enough to fit the complete path-name in. The control I named may also not be wide enough but it can be scrolled moving the cursor.

> Please add you comment.


Clicking on the arrow of the icon for open files shows the list of last opened files, positioning the cursor on desire file shows the path.

From File menu take Properties and then the General tab.

> From File menu take Properties and then the General tab.

Thanks. That’s rather indirect, though. I was hoping for something that could be made to automatically display the path (i.e., as a ‘preference’).

The menu/keyboard shortcut does make this a bit easier: Alt + F, I (Although, if you’ve previously left the Properties window on a different tab then you’ll still need to navigate back to the “General” tab.)

There is another possibility that was tried under Linux.
The ‘File Explorer’ (Files) is opened and a ‘Libre Office’ document is opened.
If a document is dragged from the ‘File Explorer’ into the ‘Libre Office’ document then LO opens a new ‘Insert Section’ and it is possible to find the path of the document into the ‘File name’ field.

Hello everybody,

I know this is an old topic but I think my work can inspire and help others.

I searched a convenient way to display the full location of the current document in the titlebar and I found this thread (among several others) BUT I had not found my happiness which meets my need…

I spent many hours to search, test and I found an acceptable solution which fit to my needs which manage both local and network documents access (I have a NAS and many documents on it).

The solution uses LibreOffice macros written in Basic and the “on_DocLoad” code is triggered by the “Open Document” event.

To install it, just copy/paste “as is” the Github code in a macro module (welcome to use the default Module1 module or to add yours), and connect the “Open Document” event to the “on_DocLoad” code of the module … and “That’s all Folks!” :slight_smile:

Nota : for connect an event to a module’s code see here

Code : libreoffice_current_location_in_titlebar/ at master · lenainjaune/libreoffice_current_location_in_titlebar · GitHub

Disclaimer : this code is suited for Linux ; you are welcome to modify it to fit for Windows or …

See you soon



In at least some modules (and probably all but did not verify) there is an easier method to get the location rather than Shell & files:


Then you can use existing routines in the Tools library. See → [Calc] How to reference document name in macro?



My LO version :

“ThisComponent.Location” or “ThisComponent.getLocation()” (which give the same thing) doesn’t work in my cases…

For a file named “with space and accentué.odt” (I am french :slight_smile: ) in a folder named “with space” it gives for :

local : file:///home/user/Documents/with%20space/with%20space%20and%20accentu%C3%A9.odt and for
smb share : smb://NAS.local/test/with%20space/with%20space%20and%20accentu%C3%A9.odt

So I tried to find a way to natively convert URL to give a location more readable but I found nothing … so I had no other choice to accomplish this that to implement a 3rd party solution.

But I always search a native solution…

You can probably guess why I never use spaces in my file or directory names – lots of hyphens and occasional under-scores, but never spaces.

Spaces in directories, file name, database table names and fields and so much more - leads to many complications.

A new answer for an old question:
This solution does not present the path in the title bar but, it is simple and does so in a cell. The formula is:


In many of my spread sheets, for conveninence, I place this formula in one of the top left cells.

The question was tagged writer.
In a TextDocument you might use a textfield supporting the relevant service and having set the value 0 for the attribute FileFormat.
I doubt if many users woul like to have it on every page.
Showing the FilePath in the title bar of the document’s window might be preferable, and can work for every kind of document in the same way.