Trying to get XL file from Sharepoint in Edge

EdNerd

Active Member
Joined
May 19, 2011
Messages
470
Using VBA in XL365 (Win 10), I can open an XL file that is uploaded to our corporate Sharepoint site. I am using:
VBA Code:
CreateObject("Shell.Application").ShellExecute str
I am running into two issues:
(A) After opening, the Sharepoint site gets the focus, and the VBA code stops. Can I put something in there to return focus back to the code to continue the routine?
(B) When the XL file opens, it's still in the Edge browser. If I stop at loading the page that hold the file, is there a method to use to download the file? If not, can I use some kind of SaveAs method to get the file?

Thanks!
Ed
 
Wanted to expound - too late to edit:

"str" is a string variable containing the full URL of the Sharepoint site, including the XL file name. If I include the file name, the file opens. If I take out the file name, the Sharepoint page opens, but then I need to know how to attach the file and download it.

The last part of the string is "action=default&mobileredirect=true". Do I need a different "action" to accomplish what I want?
 
Upvote 0

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top