Introduction
This howto is about 3 different tips related to Open Office, Opera, and their combination with view to achieve the goal above:
- Using oofromtemplate to start up Open Office directly with the exact functionality you want;
- Employing Opera or any other unsupported mail client to send documents as mail attachments from within Open Office;
- Making Opera the default mail client of the user interface (Gnome).
Your Office Shortcut
There is an interesting menu item belonging to Open Office which is hidden for some reason in Ubuntu:Applications -> Office -> OpenOffice.org.
This is the equivalent of Microsoft's office shortcut, offering both the functions of "new office document" and "open an office document" together with a complete template and address book management in one place. In other words, it is the most intuitive way to start up Open Office.
In order to put it within reach, right-click somewhere on your desktop, and create a launcher:
- Name: OpenOffice.org
- Command: oofromtemplate
- Comment: Office Suite
- Icon: /usr/share/icons/hicolor/48x48/applications/ooo-gulls.png
You can either leave this launcher on the desktop, or better, drag it onto the menu panel on the top. You could also make up such a launcher in Avant Window Navigator (i.e. its manager) or any program or file launcher of your choice.
Send Documents With Any Mail Client You Want
Being able to send documents directly from within Open Office is not only comfortable, but also increasingly important as Microsoft finally decided to include native support for Open Documents into Office 2007 (see "Microsoft se sube al carro de OpenDocument").
All you have to do is to tell Open Office which mail client you happen to use. You do so by naming it in
Tools -> Options -> Internet -> E-mail -> E-mail program.
Unfortunately, if you enter "opera" there, you're likely to see the following error message: OpenOffice.org was unable to find a working e-mail configuration...
This is also true for any other mail client not supported by Open Office.
Never mind; just let or make that option field empty (this is obligatory!). Download the attached script, open up a terminal, and change to your download directory (let's assume it's called downloads):
Code:
cd downloads
sudo mkdir --parents /usr/local/bin
sudo cp oofromtemplate.sh /usr/local/bin/oofromtemplate
sudo chmod +x /usr/local/bin/oofromtemplate
If you do not want to use oofromtemplate, you could replace it in the commands above by, say, oowriter. In this case though, the send mail function would be available in text documents only.
However, as Opera doesn't handle attachments this way, the name of the file will appear in the "To" field of the message. Hence, you'll have to cut it from here (mark the whole line by triple-clicking on it, then Ctrl+X or right-click) and manually transfer it into the "Attach" window (with Ctrl+V). Then, you can proceed with the mail as usual.
Note: If you use another non-standard mail client, you have to adapt the Opera command line in the script to your needs.
Opera as Default Mail Client
You should now change the Mail Reader in
System -> Preferences -> Preferred Applications
to "oofromtemplate %s".
The result of this exercise is being able to start Opera's mail composer by typing mailto:recipient@his_email_server in the Run Application window (called by Alt+F2) or in a terminal. In the latter case, the mailto address must be preceded by "gnome-open ".
The mailto protocol will also work in other applications which can call it like Rubrica, Sunbird, etc. Moreover, it allows to "send to..." any document with Opera from the desktop or a folder by right-clicking on it.
Bookmarks