Question

We have too many users without office 2010.

According to what I read in these 2 blogs, Explorer view will not work in these machines

http://techtrainingnotes.blogspot.com/2010/05/sharepoint-2010-windows-explorer-view.html http://sharepointknowledgebase.blogspot.com/2010/04/explorer-view-problems-sharepoint-2010.html

I need a work around for this.

I was thinking, could I make a ribbon button to open the link without the http and changing the / with \ ??

I know that its possible to create/replace ribbon, what I dont know is the action that the button needs to have so that this works.

THanks

Was it helpful?

Solution

First some clarifications: It depends on Office, yes, but it doesn't matter if it is 2007 or 2010. It works with both versions.

Now to your question: I would create a new ribbon button like this:

Create a new feature.xml and a new elements.xml. Paste the following code in the elements.xml:

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<CustomAction Id="OpenExplorerButtonNew" Title="Open in Explorer"
            RegistrationType="List" RegistrationId="101"
            Location="CommandUI.Ribbon" >
<CommandUIExtension>
  <CommandUIDefinitions>
    <CommandUIDefinition
    Location="Ribbon.Library.Actions.Controls._children">
      <Button Id="Ribbon.Library.Actions.OpenExplorerButtonNew"
      Command="OpenExplorerButtonNewCommand"
      LabelText="Open in Explorer"
      Image32by32="/_layouts/IMAGES/ctoc32.png"
      TemplateAlias="o1"
       />
    </CommandUIDefinition>
  </CommandUIDefinitions>
  <CommandUIHandlers>
    <CommandUIHandler
    Command="OpenExplorerButtonNewCommand"
    CommandAction="javascript:
    var currentUrl = window.location.href;
    var modifiedUrl = currentUrl.replace("/", "\\").replace("http:", "").replace("https:", "");
    window.open(modifiedUrl);
    "/>
  </CommandUIHandlers>
</CommandUIExtension>

This will create a new button in the ribbon and on click it executes the specified javascript. Within the javascript get the current url and replace the characters as you mentioned. Then try to open the modified URL. That last one is the part where I'm not sure whether that will work.

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top