Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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

share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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