Show full path in the title bar

I want to show the full path on the title bar. I have not found any setting that allows that.

Request for enhancement, please add there your comment. Show current file name AND path in titlebar, Add an option to show the full path in the window title,

1 Like

I would like to have this feature. I currently have my novels in directory by location of story, and ran across one I haven’t got a logical location to look in. I can bring up the file because I pinned it. I am not a programmer and have no idea how to use the code someone posted. I just want the path of the stupid file! Thanks.

The path to an open file is always shown in File > Properties > General

If you want to see the path in the Standard toolbar in Writer then right click on the Standard toolbar and select Visible buttons > Load URL

Bug 82952 - Add an option to show the full path in the window title.

Questions to the same effect were asked more than once:
For users wanting to get a solution without needing to wait for the success of a feature request, I posted user code here: How to view 'full path' of open document?.

I currently use myself the following version, where the first two Sub are assigned to the respective events by Customize for the application.

Please note that the Basic IDE uses the .Title of a document in the left panel where the libraries and modules are displayed. If the paths are very long this may result in an annoyance. To shorten the Title a bit, I prefer to not include the protocol part if urlStyle is chosen.

Sub onViewCreated()
showFileLocationInTitleBar(False)
End Sub

Sub onDoumentSavedAs()
showFileLocationInTitleBar(False)
End Sub

Sub showFileLocationInTitleBar(Optional pUrlStyle As Boolean)
If IsMissing(pUrlStyle) Then pUrlStyle = True
url = ThisComponent.URL
If url = "" Then Exit Sub REM The document was not yet stored.
If pUrlStyle Then
  pN = Split(url, "://")(1)
Else
  pN = ConvertFromURL(url)
End If
ThisComponent.Title = pN
End Sub  

I don’t work with remote files. With pUrlStyle=False remote files may cause errors. You can include a test. Please report your experiences in this case.

[edit 2024-09-18 about 10:10 UTC]
See also this topic.
[/edit]

2 Likes

For a non-programmer, how do I use this code? Make a macro? Put it someplace else? I need easy steps. Thanks for posting.