Page 1 of 1

[Solved] Opening several files at OOo startup

Posted: Sat Feb 23, 2008 2:19 pm
by lj22
filesWelcome beginner. Please answer all of the questions below which may provide information necessary to answer your question.
-----------------------------------------------------------------------------------------------------------
Which version of OpenOffice.org are you using? 2.3.1
What Operating System (version) are you using? Windows XP
What is your question or comment? When starting Calc, can certain files be automatically opened also? Thank u...

Re: opening files

Posted: Sat Feb 23, 2008 3:28 pm
by Hagar Delest
You can record a macro opening the files you want and then assign that macro to the Calc startup event (Tools>Customize).

Thanks to add '[Solved]' in your first post title (edit button) if your issue has been fixed.

NB: moved the thread in the Setup and Troubleshouting forum.

Re: opening files

Posted: Sat Feb 23, 2008 6:05 pm
by acknak
A macro is one solution, but may not be required: just create a desktop shortcut that launches Calc with the specific files you want listed on the command line. Maybe some one else can give you an example--I know I've seen one here before.

Re: opening files

Posted: Sun Feb 24, 2008 1:22 am
by kingfisher
Here's an example I use: oocalc2.3 -norestore /home/data/current/office/test/Test.ods

1. You may have to alter 'oocalc2.3' - that is the name of the executable on my system; your executable may have a different name.
2. You may want to remove '-norestore'; that is a parameter I add to stop the file "recovery" process occurring.
3. You will also have to use the path and file name required.

Re: opening files

Posted: Sun Feb 24, 2008 4:09 am
by probe1
I have a macro which opens all files in a given folder,
so if your files are all in one place, this one called startOOo may help you.

Comes attached to a Writer document with German and English documentation.

Have fun with OOo!

Re: opening files

Posted: Sun Feb 24, 2008 10:02 pm
by acknak
lj22 (PM) wrote:... Seems your suggestion would be the answer to
my problem.

However, I am not familiar with creating a shortcut that has
more than one (1) target.

I'm trying to get three (3) files to auto-open when I start
Calc. If you have time and can explain/show me what to enter
on the shortcut's command line I would appreciate it.
Sorry, I don't have ready access to a Windows system to check on the proper syntax. It will be something like kingfisher suggested, only tweaked to work on Windows. You should be able to simply add the three file locations (full path and file name) at the end of the command in the shortcut, something like:
"C:\Program Files\OpenOffice.org 2.3\program\scalc.exe" "C:\Documents and settings\user\My Documents\file1.ods" "C:\Documents and settings\user\My Documents\file2.ods" "C:\Documents and settings\user\My Documents\file3.ods"

I tried a quick search here and on oooforum, but didn't find a good example to go by--lot's of posts about creating a desktop shortcut, but none with a sample command line.

Maybe someone on Windows can help out.

Re: opening files

Posted: Sun Feb 24, 2008 11:54 pm
by Villeroy
Opening *.ods in a dedicated folder should work as well:

Code: Select all

"C:\Program Files\OpenOffice.org 2.3\program\scalc.exe" "C:\Documents and settings\user\My Documents\myAutostart\*.ods"

Re: opening files

Posted: Mon Feb 25, 2008 12:40 am
by acknak
Excellent idea! Does it work?

If it works, it means that you can create a special folder under "My Documents", called "myAutostart", and any time you use the special shortcut to launch Calc, it will open all the documents in that folder. So there's no need to change the shortcut when you want to change files, just change which files are in that myAutostart folder.

Very nice idea.

PS... one more possible approach: don't exit OOo. On my system, when I forget to close OOo before I shut the system down, then the next time I boot up, OOo is started again with all the same documents loaded. I'm only half serious, but it would be a nice feature to have in OOo, to have a "session" history that could include what documents were open and then re-open them for you on start-up.

Re: opening files

Posted: Thu Feb 28, 2008 2:07 am
by lj22
unfortunately could not get that idea to work... however another person not in
this forum suggested creating a simple "batch" file targeting the files to open -
this "batch" file idea solved the problem...

THANK YOU to all in the forum that tried to help me...

Re: opening files "SOLVED"

Posted: Thu Feb 28, 2008 2:18 am
by Villeroy
Please, can you post the batch, so other Windows users can adjust it to their needs?

Re: opening files "SOLVED"

Posted: Thu Feb 28, 2008 3:34 am
by lj22
"batch" file contents:

@echo
cd "C:\Documents and Settings\LJ\My Documents" (path to file location)
start BNDS.ods (file name)
start STKS.ods (file name)
exit


add'l files can be added prior to "exit" line

Re: opening files

Posted: Thu Mar 06, 2008 2:44 am
by acknak
Villeroy wrote:Opening *.ods in a dedicated folder should work as well: ...
Just to follow up on this, Villeroy made a great suggestion, but it does not work, unfortunately.

On Windows, it's up to each application to expand wildcards on the command line, and OOo does not do it. Starting OOo on Windows with a file name of "*.odt" tries to open a file with that exact name, not all the files that match that wildcard.

On Unix, the expansion of wildcards is performed by the shell, and OOo would get a list of actual matching files and it will open all of them in separate windows. On Windows, you can specify more than one file to open, but you can't specify a wildcard.

This desktop shortcut works for me (on Windows XP) to start OOo with a set of two files:
Target: "C:\Program Files\OpenOffice.org 2.3\program\soffice.exe" "My File.ods" "Another File.odt"
Start in: "C:\Documents and Settings\AV Users\My Documents\"

The files can be any mixture of document types that OOo can open.