3

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>

2 Answers 2

6

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>
1
  • This is the best way idd Commented Mar 16, 2012 at 15:51
0

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.

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.