How can i remove "send by email" option from site display bar

Audi86 661 Reputation points
2022-06-03T15:59:16.963+00:00

Hi ,

I ma looking to remove the option "send by email" option from site top display bar

208200-image.png

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
6,070 questions
No comments
{count} votes

Accepted answer
  1. Yi Lu_MSFT 16,751 Reputation points Microsoft Employee
    2022-06-06T07:13:24.11+00:00

    Hi @Audi86
    Per my research, currently there is no OOTB method to remove the button. You could send feedback to Microsoft SharePoint Feedback.

    To hide Send by Email button, you can deploy a script edior web part and customize CSS code in it.

    Downloading the modern script editor web part in Github: https://github.com/SharePoint/sp-dev-fx-webparts/tree/master/samples/react-script-editor#script-editor-web-part-for-modern-pages-built-in-react

    Here is a tutorial about how to deploy the modern script editor: SharePoint | Online | Best Practice | install Modern Script Editor Web Part for SharePoint Online Modern Site.

    Then, Add the below CSS code to the web part:

     <style type="text/css">  
          
     button[name="Send by email"]  
     {  
         display: none;  
     }  
          
     </style>  
    

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    No comments

0 additional answers

Sort by: Most helpful