[Solved] Opening several files at OOo startup

Discuss setup / installation issues - Add a spell checker, Language pack?

[Solved] Opening several files at OOo startup

Postby lj22 » Sat Feb 23, 2008 2:19 pm

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...
Last edited by lj22 on Thu Feb 28, 2008 2:11 am, edited 1 time in total.
lj22
 
Posts: 3
Joined: Fri Feb 22, 2008 10:40 pm

Re: opening files

Postby Hagar Delest » Sat Feb 23, 2008 3:28 pm

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.
AOO 4.1.6 on Xubuntu 18.10 and 4.1.5 on Windows 7 (with winPenPack port).
User avatar
Hagar Delest
Moderator
 
Posts: 28257
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: opening files

Postby acknak » Sat Feb 23, 2008 6:05 pm

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.
AOO4/LO5 • Linux • Fedora 23
User avatar
acknak
Moderator
 
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: opening files

Postby kingfisher » Sun Feb 24, 2008 1:22 am

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.
Apache OpenOffice 4.1.2 (64 bit) on PCLinuxOS
User avatar
kingfisher
Volunteer
 
Posts: 2111
Joined: Tue Nov 20, 2007 10:53 am

Re: opening files

Postby probe1 » Sun Feb 24, 2008 4:09 am

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!
Cheers
Winfried

DateTime2 extension: insert date, time or timestamp, formatted to your needs
User avatar
probe1
Volunteer
 
Posts: 277
Joined: Mon Oct 08, 2007 1:34 am
Location: Chonburi Thailand

Re: opening files

Postby acknak » Sun Feb 24, 2008 10:02 pm

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.
AOO4/LO5 • Linux • Fedora 23
User avatar
acknak
Moderator
 
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: opening files

Postby Villeroy » Sun Feb 24, 2008 11:54 pm

Opening *.ods in a dedicated folder should work as well:
Code: Select all   Expand viewCollapse view
"C:\Program Files\OpenOffice.org 2.3\program\scalc.exe" "C:\Documents and settings\user\My Documents\myAutostart\*.ods"
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, OpenOffice 4.x & LibreOffice 6.x
User avatar
Villeroy
Volunteer
 
Posts: 25837
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: opening files

Postby acknak » Mon Feb 25, 2008 12:40 am

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.
AOO4/LO5 • Linux • Fedora 23
User avatar
acknak
Moderator
 
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: opening files

Postby lj22 » Thu Feb 28, 2008 2:07 am

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...
lj22
 
Posts: 3
Joined: Fri Feb 22, 2008 10:40 pm

Re: opening files "SOLVED"

Postby Villeroy » Thu Feb 28, 2008 2:18 am

Please, can you post the batch, so other Windows users can adjust it to their needs?
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, OpenOffice 4.x & LibreOffice 6.x
User avatar
Villeroy
Volunteer
 
Posts: 25837
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: opening files "SOLVED"

Postby lj22 » Thu Feb 28, 2008 3:34 am

"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
lj22
 
Posts: 3
Joined: Fri Feb 22, 2008 10:40 pm

Re: opening files

Postby acknak » Thu Mar 06, 2008 2:44 am

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.
AOO4/LO5 • Linux • Fedora 23
User avatar
acknak
Moderator
 
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3


Return to Install, Setup and Troubleshooting

Who is online

Users browsing this forum: No registered users and 7 guests