Trying to use an alias for LibreOffice to open a particular type of document.

I am using a Mac, macos High Sierra.

I have created three aliases of LibreOffice — naming alias #1 Excel.app, alias #2 PowerPoint.app, and alias #3 Word.app.

Is it possible to have the Excel.app alias automatically open a new spreadsheet document, the PowerPoint.app alias automatically open a new presentation document, and the Word.app alias automatically open a new text document?

What do these apps do now when you first start them??

https://help.libreoffice.org/latest/en-US/text/shared/guide/start_parameters.html

Mike,

Notice that the link you pointed out doesn’t have a true Mac solution. The closest was “Unix like.” Furthermore, an example — not by you, but by whomever wrote the start_parameters “solution” — would clear up a lot of confusion (at least on my part). I’d assume that a terminal command is what would need to be used, but I’m not sure.

Thanks,
-Don

Martin,

Without sounding like a jerk, are you not a Mac user? An alias is a basic item in the Mac world, and, in this case, each of the three aliases simply invokes LibreOffice.

-Don

My objective is to have an Office equivalent using LibreOffice. Hence, wanting the Excel.app alias to open a new spreadsheet when executed. Similarly, PowerPoint.app alias—>open a new presentation doc; and Word.app alias—>open a new text document.

@donfarrar I was not questioning what an alias is. If your apps don’t open in a new document, what do they open with? Some old document? Which one and what determines which one? Therein lies the key, I think, to making the apps open in a new document. Other solutions have also been provided.

The three aliases are all simple aliases of the LibreOffice program. Therefore, right now, when any of the three aliases is double-clicked, no document is opened, since that’s the default action for LibreOffice, and one must specify a new document or point to an existing document. Hence, my desire to have the Excel.app alias, by default, open a new spreadsheet document; the PowerPoint.app alias to open a new presentation document; and the Word.app alias to open a new text document. And since I’m trying to make a functioning Office replacement, it has to be easy-to-use. No convoluted terminal commands, just each alias, with new icons, doing as specified in the previous sentence. Perhaps this is not possible. I don’t know. Hence, the question on the forum.

Approach this as if you were trying to provide a relative, who is not tech saavy, with an Office replacement package using LibreOffice. What would you do? I’d think you’d want to provide the simplest solution possible.

@donfarrar, @mikekaganski is always a fount of useful information, all you have to do is adapt his information to the pertaining OS, in this case macOS.

Here’s my convoluted-but-functioning method to solve your problem.

  1. Open Automator and click New > Application.

  2. In the middle column of the window that opens, find “Execute Shell Script” and drag it to the rightmost column.

  3. In the text area presented enter the following command:

/Applications/LibreOffice.app/Contents/MacOS/soffice --writer

  1. The parameters of this next step are all up to you – Save this new application somewhere, give it a name and a new icon. I saved mine in my home directory’s Applications folder just for organization’s sake.

As for the icon, I first did a CMD-I on my new application (named “LOWriter.app”). Then I found /Applications/LibreOffice.app/Contents/Resources/text.icnsand dragged that icon directly onto the LOWriter.app’s Get Info window’s icon. I didn’t do a copy icon and paste icon which is the usual procedure because text.icns itself has a generic icon. This method extracts the actual icon information inside the icon file.

For your “PowerPoint.app” and “Excel.app”, lather, rinse and repeat. At this point you can alias them anywhere you’d like.

I’m sure there are other methods, possibly more streamlined or efficient, but like the old joke…

“How do you spell ‘Mississippi’?”

“M-I-S-I-SS-I-P-I.”

“That’s not right. That can’t be right.”

“Hey…you asked me how I spell 'Mississippi!”

Mike,

So, within the “innards” of LibreOffice is a piece named “soffice,” contained with “MacOS.” I see that when performing a “Show Package Contents” on the LibreOffice app. And it appears that you can pass it one of seven parameters: --writer, --calc, --draw, --impress, --math, --global, or --web.

I already have three new icons for each alias, if I ever get that far. [And I did see the “text.icns” within the “Resources” folder, along with many other .icns files.]

“–writer” seems obvious. However, what isn’t obvious (to me), is what parameter to use for a PowerPoint doc, and what parameter to use for an Excel doc. “–calc” for an Excel doc? None of the parameters appears to be for a presentation/PowerPoint doc.

-Don