2

I'm trying to add a custom 'Open in Explorer' button to the page using Content Editor Web Part.

This is the code I've found and tried with no success:

<a href='#' onClick="javascript:CoreInvoke('NavigateHttpFolder', 'https://mySPOsite.sharepoint.com/sites/mySubsite/myLibrary', '_blank');">Open myLybrary in Explorer</a>

This doesn't give any errors when I debug it, in fact it opens a small new IE window:

enter image description here

(it does the same when I use the 'Open in explorer' option in the ribbon).

But after the little window closes, file explorer never opens as it should..

Any ideas? TIA

Update:

The code now sometimes works?

And the default button in the ribbon sometimes doesn't?

2 Answers 2

2

You HTML code is correct

<a href='#' onClick = "javascript:CoreInvoke('NavigateHttpFolder', 'http://sharepoint.local/sites/siteCollection/Style Library', '_blank');"> Open Style Library in Explorer</a>

So, Please make sure about below points.

  1. Go to Administration Tools --> Services. and check WebClient service is running or not. If not then please do start it.
  2. You will not able to see WebClient service on Windows Server 2008R2 by default. You need to install Desktop Experience feature on your machine and then restart it. You will be able to see WebClient Service in Services under Administration Tools. Now you can start it
  3. Most important thing, This will work with only IE Browsers. As you can see Open with Explorer is work with IE only. Also, It's not working in MS Edge

I have written this from Jaydeep Mungalpara answer

1

Just solved my issue.

As @Bharat said, there's nothing wrng with the javascript code.

My site was added as an intranet site in IE settings, and the solution was to move my site to trusted sites:

Internet options -> Security -> Trusted sites -> Sites -> add 'http://mySPOsite.sharepoint.com' and apply the changes. (You may need to re-open IE)

Even the default 'Open in Explorer' button sometimes doesn't work if the site is not added to trusted sites.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.