Go Premium for a chance to win a PS4. Enter to Win


Is There A Way Or Means With LibreOffice Writer To Save By 'Default’ The First Few Letters Of The Words Or Phrases Within The First Few Words Or Phrases In The File Document Itself?

Posted on 2012-04-08
Medium Priority
Last Modified: 2013-11-13
Hello. I have a question to ask you.

In LibreOffice Writer v. (latest), part of LibreOffice Productivity Suite, regardless of the distribution version for compatible operating systems like Windows or Linux like Ubuntu; when you go to save a document it ALWAYS BY ‘default’ saves [such as selecting “As Save” and “Save”] – it saves the document file as “Untitled 1”, “Untitled 2”, etc. When I save a document file with Microsoft Office Word 2003/2007/2010, it will save by default (No user modifications – it is per-programmed (“out of the box”) to behave that way.) by the first few words or phrases within the first few words or phrases in the file document itself where ever you wish to save the document file in the system.  

Question I am asking:

Is there a way or means with LibreOffice Writer to save by default’ the first few letters of the words or phrases within the first few words or phrases in the file document itself – much like Microsoft Office Word 2003/2007/2010 does?

Yes, I obviously will need to ‘change’ LibreOffice Writer to a different and new ‘default’ format to save the document file in that manner, but once setup in that manner; it will always be the ‘default’ manner in which to save document files with LibreOffice – by the first few letters of the words or phrases within the first few words or phrases in the file document itself.


This document file renaming gives me some limited knowledge about what the document file is about when I am looking at a LibreOffice Writer icon on my desktop instead of “Untitled 1”, “Untitled 2”, etc. that does not tell me anything really about the document file. This way by having some limited knowledge about what the document file is about instead of having to open each file on my desktop to find what I am looking for the correct document file. Yes, I can ‘manually’ rename EACH the document file to what I want it to say; but I am looking for a quick new default way or means to achieve this like Microsoft Office Word 2003/2007/2010 does naturally out of the box.

Please reply.

Thank you!
Question by:Bazingeroo
  • 3
  • 3
LVL 39

Accepted Solution

BillDL earned 2000 total points
ID: 37823600
Users of Microsoft Office have been spoiled, whereas this is a feature that has been missing from OpenOffice and (seeing as it is a direct offshoot of OpenOffice) now from LibreOffice.

You need to use some Macro code to implement this behaviour, but it is suggested by the author of the code that you assign it to a key combination, so it's not entirely default behaviour.

See here for code and instructions respectively.  It's for OpenOffice but should work fine in LibreOffice:

Hope it works for you.  I haven't tested it because I really have no need.  I just use File > Save As and provide an intuitive and identifiable file name.

Author Comment

ID: 37830820
@ BillDL:

Hello. Nice to meet you.

Thank you for your comment!

I see you provided me EXCELLENT resources directly and exactly what I need. The ones I very much need! THANK YOU!!! These weblinks you have provided are well described and are comprehensive and yet I have not tried them, 'I know' they will work after reading excerpts. I have heard of using Macros 'many' times online, but I have had very little experience in using them. I can see from the instructions, it is idiot-proof and I do not see any issues here. A BIG THANK YOU!!!

I have one further question to ask you... ...will these instructions for LibreOffice work (compatible) with BOTH Windows 7 AND Linux Ubuntu platforms or not and just one of these platforms? Please explain. Since LibreOffice has distribution versions for both platforms, I would really like to have this solution available to both operating system platforms since I have both Ubuntu and Windows 7 and I have LibreOffice installed on both of them. Please let me know and explain if this solution you ALREADY have provided does indeed work with both operating system platforms or  not?

If not – If you know a solution to the other operating system to where (in the possibility) your solutions do not apply, could you please provide that solution for that other operating system too – please!!!

I have been doing some preliminary reading from your weblinks and I didn't see any indication of the applicable operating system. 'Usually' from experience, it means 'Windows' operating systems. Yet LibreOffice is an open source program suite that seems your weblinks would be more applicable to Linux/GNU/Unix Systems like Debian/Ubuntu. Hmmm...    

Please reply.

Thank you!
LVL 39

Assisted Solution

BillDL earned 2000 total points
ID: 37848317
Hello again Bazingeroo

I am sorry I never came back to see your follow up comment.  For some reason I didn't receive the email notification that you had posted.

I only have a bare knowledge of Unix/Linux operating systems, but I am fairly sure that the Macro code you create within OpenOffice and LibreOffice does not care what operating system the application suite is installed on.  The instructions are internal, so it is almost like the application is telling itself what to do rather than having to ask Windows or Linux what to do.

The only potential issue that I could imagine is if you typed up the macro code in Windows Notepad and copied a *.txt file across to a Linux system (or the other way around) so that you could open the file then copy the code from the text document and paste it into the Macro Editor of LibreOffice.  Text documents written and saved in Linux create the Hex characters 0A at the end of each line.  That's the "newline character".  0A hex = 10 decimal, and is known as the LF (line feed) character or \n.  A text document written in Windows applies a Line Feed and a CR (Carriage Return) character for new lines. This is 0D hex or 13 decimal, and is also notated as \r.  So Windows "DOS" text has 0A-0D or CR-LF or \r \n and Linux text has 0A or LF or \n.

If you ever open a text file that was created on a Linux system in a Windows text editor, the lines of text don't break and just run into each other.

I am pretty sure that the Macro Editor in LibreOffice will take care of the differences between the pasted text and convert it, or at least will not care.

I suppose there is only one way to find out and that is to test it out.

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Author Comment

ID: 37849833
@ BillDL:

Hello again. Thank you for your latest comment.

There is no problem at all with you responding in a few days. Yet, I am sure if you received some notification, I am sure you would of responded sooner too. Believe me, with my busy life off the computer and all my open questions, sometimes me myself have difficulties getting right back.

Okay, thank you for latest answers. I truly appreciate your technical explanation of using the text editors and transferring data between the two programs and the issues that happen when transferring data. Using the Macro Editors in both LibreOffice operating system distribution versions for Microsoft Windows and Linux Ubuntu should not be an issue. Thank you for that.

I am now closing this thread/question. All further questions to this topic are now complete.

Again, thank you!

Thank you!

Author Closing Comment

ID: 37849889
@ BillDL:

Hello again.

Thank you for your EXCELLENT and WELL DONE research for me!!! The research necessary to be conducted for a topic/issue I have presented here that requires exquisite and extensive research skills for an unusual topic like this and yes, little luck to find ANY conceivable answer. Yes, I will admit that this question/thread presented a high level of difficulty to find an answer. Honestly, I expected this question/thread to go abandoned; but I thought I would at least give it a try here on EE. Actually, I was taking my chances to get some kind of response even if it was indirect or unrelated responses on this question/thread. You hit it on the bullseye!!! WOW!!! I am amazed and praise your Sherlock Holmes ability to find answers and solutions for difficult topics like this one!!! I see you do not leave any stone unturned and have strong critical analysis skills!!! A BIG THANK YOU!!!

I am giving you 400 points for your first exceptional comment that provides the actual core solution to this issue -- Accepted Solution. For second comment again, explicitly answers my later applicable question with great detail and exactness. (That I greatly appreciate!) I am giving you 100 points for that one -- Assisted Solution.

If I could give you more, I would!!!

LVL 39

Expert Comment

ID: 37850042
Thank you very much Bazingeroo :-)

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
What do responsible coders do? They don't take detrimental shortcuts. They do take reasonable security precautions, create important automation, implement sufficient logging, fix things they break, and care about users.
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question