It is currently April 16th, 2024, 7:40 pm

Opening new from .dotx or .xlsx templates

Get help with creating, editing & fixing problems with skins
durbs
Posts: 2
Joined: March 20th, 2017, 2:36 pm

Opening new from .dotx or .xlsx templates

Post by durbs »

I've got a couple of MS Word / Excel templates which I'm trying to link to.

Opening them "normally" by double-clicking the the .dotx filename creates a new document based on the template (as opposed to opening the template itself).

However the command:
LeftMouseUpAction=!Execute["\\folders\blah\blah\PRICING 2016-17.xltx"]
opens the template.

In Windows-speak, I want to right-click the shortcut and 'New' rather than right-click and 'Open'.

Any ideas?
User avatar
CyberTheWorm
Posts: 860
Joined: August 22nd, 2016, 11:32 pm
Location: Surrey, B.C., Canada

Re: Opening new from .dotx or .xlsx templates

Post by CyberTheWorm »

durbs wrote:I've got a couple of MS Word / Excel templates which I'm trying to link to.

Opening them "normally" by double-clicking the the .dotx filename creates a new document based on the template (as opposed to opening the template itself).

However the command:
LeftMouseUpAction=!Execute["\\folders\blah\blah\PRICING 2016-17.xltx"]
opens the template.

In Windows-speak, I want to right-click the shortcut and 'New' rather than right-click and 'Open'.

Any ideas?
Have you tried

Code: Select all

excel.exe /n "c:\My Folder\book_name.xlsx"
I belevie that will open as a new file or you could use

Code: Select all

excel.exe /r "c:\My Folder\book_name.xlsx"
which will open as read only.

Should be the same for word.
The only source of knowledge is experience. Albert Einstein
Deviant Art Page
durbs
Posts: 2
Joined: March 20th, 2017, 2:36 pm

Re: Opening new from .dotx or .xlsx templates

Post by durbs »

Wicked thanks.

It's not quite doing what a "normal" operation would be doing, but close enough :)