Debian Lenny comes by default with OpenOffice 2.6.4, but in the meantime OpenOffice 3.1 was released. You can easily install it on your Debian box by using the Debian Lenny backports repository, which is a repository including newer versions of applications than the ones which come by default with Lenny. Just follow the steps below:
Add the backports repositories
To add the Lenny backports repositories, just edit as root your /etc/apt/sources.list file and add the following line:
deb http://www.backports.org/debian lenny-backports main contrib non-free
Make sure to save the file (Ctrl+O followed by Ctrl+X in Nano) and proceed to the next step.
Install the Debian backports keyring
As root, type:
apt-get install debian-backports-keyring
This will install the debian-backports-keyring package, adding the key to your trusted repository keys.
Update the package lists
Now, update the package lists as root:
And install OpenOffice.org:
apt-get -t lenny-backports install openoffice.org
This should be all. OpenOffice.org 3.1.0 should be now installed properly on your Debian box, and you can run it by typing openoffice.org in a Run box or opening a terminal application and typing openoffice.org.