[Solved] Keep original name after File → Save As

Discuss setup / installation issues - Add a spell checker, Language pack?
Locked
THEBookMan
Posts: 122
Joined: Wed Sep 30, 2015 10:03 pm
Location: Houston, TX area

[Solved] Keep original name after File → Save As

Post by THEBookMan »

When I am working with a file: "XYZ.MAIN.sxc" and do a "save as" to "xyz.BU.szc", The file that is active is "XYZ.BU.sxc" rather than "XYZ.MAIN.szc"

Is there a way, after I do a backup, to come back to the same file I was working on ?

Thanks,
⌡im [THE BookMan]
Last edited by MrProgrammer on Tue Apr 01, 2025 3:32 pm, edited 1 time in total.
Reason: Tagged ✓ [Solved]
Open Office 4.1.3 Win 10
User avatar
RoryOF
Moderator
Posts: 35165
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Keep original name

Post by RoryOF »

Yes, you have to close the newly named file and reopen the original, which should show on the Recent Documents list.
Apache OpenOffice 4.1.16 on Xubuntu 24.04.3 LTS
THEBookMan
Posts: 122
Joined: Wed Sep 30, 2015 10:03 pm
Location: Houston, TX area

Re: Keep original name after File → Save As

Post by THEBookMan »

As I have been doing .....Thanks, ⌡im [THE BookMan]
Open Office 4.1.3 Win 10
User avatar
RoryOF
Moderator
Posts: 35165
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Keep original name after File → Save As

Post by RoryOF »

Remember that the originally named file does not have the latest alteration, unless it was Saved immediately before the Save As, which gives it the new name. Ctrl S is the quick (and should be instinctive) way to Save a file.
Apache OpenOffice 4.1.16 on Xubuntu 24.04.3 LTS
User avatar
Lupp
Volunteer
Posts: 3744
Joined: Sat May 31, 2014 7:05 pm
Location: München, Germany

Re: Keep original name after File → Save As

Post by Lupp »

Also 1:
Every document has an interface allowing

Code: Select all

document.storeToURL()
This method stores a copy of the document as it currently is to a different file under any location and name described as an URL. The open document will continue to be editable under the old URL (FilePath)

Code: Select all

Sub storeCopy()
oDoc = ThisComponent
oDoc.storeAsURL(oDoc.URL & ".copy", Array())
End Sub
would store the document's persistent content using an "extended extension" like .odt.copy e.g.
With the help of >Tools>Customize you can add the command to a menu or a toolbar.
If you want to be more flexible concerning the new location and name, it gets more complicated.

Also 2:
LibreOffice has a menu entry ">File>Save a Copy..." offering more flexibility without needing user code.
On Windows 10: LibreOffice 25.8.4 and older versions, PortableOpenOffice 4.1.7 and older, StarOffice 5.2
---
Lupp from München
User avatar
Hagar Delest
Moderator
Posts: 33564
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Keep original name after File → Save As

Post by Hagar Delest »

File > Save a copy (at least in LO).

Please add [Solved] at the beginning of the title in your first post (top of the topic) with the button if your issue has been fixed.
LibreOffice 25.2 on Linux Mint Debian Edition (LMDE 7 Gigi) and 24.8 portable on Windows 11.
Locked