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

How can I, via a feature, hide the 'Connect To Outlook' button from the 'Connect & Export' group in the 'Calendar' tab when I view a calendar on a SharePoint 2010 site?

I have tried several variations, none of them work. What is the correct XML for this?

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
    <HideCustomAction
      Location="Ribbon.Calendar.Calendar.Actions"
      HideActionId="ConnectToClient">
    </HideCustomAction>
</Elements>


<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
    <HideCustomAction
      Location="Ribbon.Calendar.Calendar.Actions"
      HideActionId="Ribbon.Calendar.Calendar.Actions.ConnectToClient">
    </HideCustomAction>
</Elements>


<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
    <HideCustomAction
      Location="Ribbon.Calendar.Calendar.Actions.Controls"
      HideActionId="Ribbon.Calendar.Calendar.Actions.ConnectToClient">
    </HideCustomAction>
</Elements>

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
    <HideCustomAction
      Id="RemoveRibbonButton"
      Location="Ribbon.Calendar.Calendar.Actions.ConnectToClient">
    </HideCustomAction>
</Elements>

    <?xml version="1.0" encoding="utf-8"?>
    <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
        <CustomAction
          Id="Remove.Calendar.ConnectToClient"
          Location="CommandUI.Ribbon">
            <CommandUIExtension>
                <CommandUIDefinitions>
                    <CommandUIDefinition
                      Location="Ribbon.Calendar.Calendar.Actions.ConnectToClient" />
                </CommandUIDefinitions>
            </CommandUIExtension>
        </CustomAction>
    </Elements>

    <?xml version="1.0" encoding="utf-8"?>
    <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
        <CustomAction
          Id="RemoveRibbonButton"
          Location="CommandUI.Ribbon">
            <CommandUIExtension>
                <CommandUIDefinitions>
                    <CommandUIDefinition
                      Location="Ribbon.Calendar.Calendar.Actions.ConnectToClient" />
                </CommandUIDefinitions>
            </CommandUIExtension>
        </CustomAction>
    </Elements>
share|improve this question

2 Answers 2

According to Connect to Outlook – Tipps und Tricks (English version), it looks like you want something like this:

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
    <CustomAction
      Id="RemoveRibbonButton"
      Location="CommandUI.Ribbon"
      RegistrationType="List"
      RegistrationId="106">
        <CommandUIExtension>
            <CommandUIDefinitions>
                <CommandUIDefinition
                  Location="Ribbon.Calendar.Calendar.Actions.ConnectToClient" />
            </CommandUIDefinitions>
        </CommandUIExtension>
    </CustomAction>
</Elements>
share|improve this answer
    
This is the best way idd –  Frederik P. Mar 16 '12 at 15:51

Really simple to hide the item using a stylesheet. Determine the Connect to Outlook button ID using the F-12 developer bar.

In my case, it has an ID of

Ribbon.Calendar.Calendar.Actions-LargeMedium-0-0

(decimal points and colons are valid in ID names. Not sure why, but the W3C allows them)

Stylesheet syntax (since ID name contain decimal points) will be

[id='Ribbon.Calendar.Calendar.Actions-LargeMedium-0-0'] {display:hide !important;}

Apply the stylesheet in a CEWP, et voila. Note that this affects all users.

share|improve this answer

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.