Open MS SharePoint links in App instead of browser

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
The_One_True_Rick
Posts: 65
Joined: 25 May 2023, 17:14

Open MS SharePoint links in App instead of browser

Post by The_One_True_Rick » 29 May 2023, 15:41

in my script I have a button that opens a SharePoint link for an excel document in chrome. That works fine but it would be nice if I could open it straight in excel without first opening it in chrome. I can get to excel by just clicking the open in app button on the top of the excel browser version but is there a way to modify a link to take me right to the excel app.

Currently using: Run, Chrome.exe "My SharePoint Link"

Would like something like: Run, EXCEL.EXE "My SharePoint Link"

Its a live document that changes so I don't think I can just save it to my desktop and open it that way as a file and other people also use my script to open their version of the doc as well. Just trying to avoid the step of going from link to chrome and then from chrome to excel app. App adds more functionality with AHK since I can connect to it in ways chrome blocks.

User avatar
flyingDman
Posts: 2817
Joined: 29 Sep 2013, 19:01

Re: Open MS SharePoint links in App instead of browser

Post by flyingDman » 29 May 2023, 17:45

You can open excel files from Sharepoint using COM:

Code: Select all

prjctpth 	:= "https://XXX.sharepoint.com/YYY"
file2open 	:= prjctpth "/test1.xlsx"				
xl 			:= ComObjCreate("Excel.Application")
wrkbk 		:= xl.Workbooks.Open(file2open,0,0)
I use this daily.
14.3 & 1.3.7

The_One_True_Rick
Posts: 65
Joined: 25 May 2023, 17:14

Re: Open MS SharePoint links in App instead of browser

Post by The_One_True_Rick » 30 May 2023, 22:23

Awesome! thanks I'll check this out

Post Reply

Return to “Ask for Help (v1)”