OOo Off the Wall: Adding AutoText to Your Work Flow
November 1st, 2005 by Bruce Byfield in
AutoText is a subsystem of macros used to add content to a document. By entering the macro--the shortcut in the terminology of AutoText--and calling the subsystem, you quickly can add blocks of text or objects such as graphics without having to select them from a file manager. And, you can do all of this without having to type more than a few characters.
A large number of AutoText entries are pre-loaded in OO's Writer. They include templates for business cards, brochures and standard business and job application letters, as well as frequently used phrases for business and correspondence. One entry that is especially useful for designers is dummy text, a random group of paragraphs that you can add quickly to a design to see how it works and looks.
Designing and storing your own AutoText entries is simple enough that you easily can add your own. By doing so, you can customize how AutoText works in your OpenOffice.org installation. If you want, you even can print out a list of current entries to help you keep track of them.
AutoText is especially useful for:
Text that you continually are re-using. For example, if constantly are explaining the provisions of the GNU General Public License in your documents, you could create an AutoText entry for your standard explanation instead of continually copying and pasting it. Moreover, because the entry is stored with OpenOffice.org, you wouldn't have to search for the explanation or maintain a separate file for it.
Graphics that you continually are re-using. For instance, if you are a technical writer, you might use a certain graphic at the top of a written warning or caution. You might be able to add the graphic as a special type of bullet to a list style. By making it an AutoText entry, however, you avoid the limitation of having to keep the graphic small enough so as not to distort line spacing in the paragraph to which it is attached.
An alternative to a template. Instead of creating a letter template, for example, you could create an AutoText entry to create a blank letter ready for use.
Special characters that you constantly use. You can achieve the same results by using regular macros. But, OpenOffice.org Writer comes with far fewer AutoText entries than regular macros, so you may be able to keep track of them more easily.
AutoText entries are added to your OpenOffice.org installation rather than to a particular document. In other words, the entries you add in one document automatically are available in other documents.
To add an entry:
1. Select the text and/or objects to be added to AutoText.
If you want the AutoText entry to take on the formatting of the text around it, that text must be in the default of Times New Roman. Otherwise, the entry will use a specific font. Although a specific font may work if it is the one used by your Text Body paragraph style, in most cases, it reduces the entry's flexibility.
When you add an object such as a picture, each object must be:
Anchored As character. You can set this characteristic from the right-click menu.
Have one space or character before and after it.
If both of these conditions are not met, the AutoText tool is not available when the object is selected.
2. Select Edit > AutoText.
The AutoText screen opens.
3. Enter a name for the AutoText entry.
This name is how the new entry will be listed in the AutoText screen. Note, AutoText names are case-sensitive. AUTO is a different name from auto.
4. Enter the shortcut for the AutoText entry.
The shortcut is the characters you type to add the entry using AutoText. You can select the suggestion that Writer makes for the shortcut or choose your own. If you enter your own shortcut, and an existing AutoText item in the same category already uses it, you are warned of the conflict when you save the item.
5. Select an AutoText category for the item. Categories are the items at the top of the hierarchy tree in the AutoText pane. If they are open to display the entries in the category, they have a minus sign beside them. If they are closed, they have a plus sign beside them.
Categories are the equivalent of directories in a file manager. They are a way of organizing AutoText items so you can find them more easily.
6. Select the AutoText button and then either "New" or "New (text only)". As the choices suggest, use New for mixtures of regular text and objects, and New (text only) for entries consisting entirely of regular text.
Your new AutoText entry now is ready for use.
AutoText entries can be added to any document. To add one:
1. Place the mouse cursor where you want to add the text.
2. Do one of the following:
Select Edit > AutoText, and then select the entry followed by the Insert button.
Type the shortcut and then select the F3 key. If you are using AutoText to enter special characters, the shortcut must be entered as a separate word or selected with the mouse before you press the F3 key.
If the "Display remainder of entry while typing" box is selected in the AutoText window, you can move through the list of possibilities by selecting Ctrl+Tab. To move backwards in the list, select Ctrl+Shift+Tab.
In either case listed above, the shortcut is removed and the AutoText entry is added to the document instead. The AutoText entry is added using the format of the paragraph that it is in.
The AutoText screen shows a virtual directory list of categories. This list is composed of all the AutoText files found in the AutoText path.
You can customize AutoText by:
Setting new paths to the directories where AutoText files can be stored. Paths for AutoText entries can be added from Edit > AutoText > Path or from Tools > Options > Paths > AutoText. By default, each user has two paths, one for the general installation of OpenOffice.org and one in his own .openofficeorg2 directory. If you want a particular AutoText entry to be available to all users on your system, it must be added either to the general installation path or to a directory for which all users have read permissions. They do not need to have write permissions.
Enabling AutoText autocompletion by selecting the "Display remainder of name while typing" box. Selecting this box enables autocompletion for entering shortcuts. To be used in autocompletion, each shortcut must be at least three characters long. Autocompletion is added after the third character. The name of the suggested entry appears in a yellow text box above the current mouse position in a document.
If more than one autocompletion is possible for the typed characters, you can move through the list of possibilities by selecting Ctrl+Tab. To move backwards in the list, select Ctrl+Shift+Tab.
To accept an autocompletion, press the Enter key or whatever other key is chosen using Tools > AutoCorrect/Autoformat > Word Completion > Accept with.
Creating new categories to organize AutoText entries by selecting Edit > AutoText > Categories. Categories are directories in the virtual directory structure. As you start to use AutoText heavily, you'll find that you need new categories to keep entries organized.
Displaying path names as a filesystem path or as an Internet URL by selecting Edit > AutoText > Save links relative to. Because AutoText is an editing aid rather than a feature of a finished document, this setting exists only for your personal convenience. It has no effect on whether an AutoText entry displays.
You can scroll through all of your AutoText entries in Edit > AutoText. The AutoText list, however, is not the easiest one to scroll through, even when "Show preview" is on. You instead may prefer to print a list of entries to a new document:
1. Select Tools > Macros > Organize Macros > OpenOffice.org Basic > Gimmicks > AutoText > Main.
2. Select the Run button.
A new document opens and a list of AutoText entries is added to it. The list shows entries and their shortcuts, but no preview.
3. To refer to the list more easily, save or print it.
AutoText is neither a flashy nor a complex feature of OpenOffice.org. It has a few eccentricities, but once they are learned, AutoText simply is a dependable workhorse of a feature. If you use Writer for only one- or two-page documents, you may never notice it's there. However, if you're writing long documents and reusing information, it quickly can become a valued member of your writing/editing stable. Spend five minutes acquainting yourself with AutoText, and your investment of time soon will be repaid dozens of time over.
--
Bruce Byfield (nanday)
Special Magazine Offer -- Free Gift with Subscription
Receive a free digital copy of Linux Journal's System Administration Special Edition as well as instant online access to current and past issues. CLICK HERE for offer
Linux Journal: delivering readers the advice and inspiration they need to get the most out of their Linux systems since 1994.
Subscribe now!
The Latest
Newsletter
Tech Tip Videos
- Jul-01-09
- Jun-29-09
Recently Popular
From the Magazine
July 2009, #183
News Flash: Linux Kernel 3.0 to include an on-the-go Expresso machine interface! Ok, maybe not, but Linux is definitely going mobile, from phones to e-readers. Find out more inside about Android, the Kindle 2, the Western Digital MyBook II, The Bug, and Indamixx (a portable recording studio). And if you've gone mobile and you been wanting more Emacs in your life then check out Conkeror.
To compliment the mobile we've got the stationary: parsing command line options with getopt, checking your Ruby code with metric_fu, and building a secure Squid proxy. How is this stationary you ask? What can we say? It's not. We just wanted to see if anybody actually read this part of the page :) .
All this and more, and all you have to do is get your hot sweaty hands on the latest copy of Linux Journal.

Delicious
Digg
StumbleUpon
Reddit
Facebook








estetik
On July 14th, 2008 estetik (not verified) says:
very nice aerticle...
Thats a great idea and I
On July 6th, 2006 TheRealAlex (not verified) says:
Thats a great idea and I never used this before. With this step by step tutorial I think I can use this now too...
While AutoText is useful, it
On January 11th, 2006 Anonymous (not verified) says:
While AutoText is useful, it still does not add as much function or ease of use as a true text expander would. The Windows and Mac worlds have several such text/abbreviation expander programs, but there seem to be none available for Linux. For increased productivity, increased work flow and ease of use, nothing beats a good text expander. Linux programmers, take note, please!
System-Wide Word Expander NEEDED!
On May 25th, 2006 Wally (not verified) says:
Please, please, please would a kind and thoughtful Linux programer undertake creating such a program?! I am a medical transcriptionist and have just recently started using Linux. The comprehensive word expander is the one thing that ties my coat tails to the Windows/Microsoft industrial complex. Multiple thousands of medical transcriptionists, such as I, work at home. This would be a means of prying a group of users to Linux.
I think this will be rather
On January 27th, 2009 MikeBillis (not verified) says:
I think this will be rather difficult to program dont you think?
Mike from kansas city vacation guide
using autotext
On November 2nd, 2005 Anonymous (not verified) says:
My wife has resisted OpenOffice because we could not get autotext to function her way(The Windows way). She does Mediacal Transcription 40 or 50 hours a week.
Thank you for a very useful guide to easing her transition from Word 2000 on Windows to OpenOffice on Linux.
Post new comment