How to Show a Custom Use-Note Dialog When a SharePoint File Opens
Question details
The user wants to know how to display a custom notification, alert, or use-note dialog automatically when a file is opened in SharePoint.

- Product
- SharePoint
- Device & OS
- not provided
- Scenario
- A workspace administrator or user needs to display specific alerts, disclaimers, or usage instructions to colleagues immediately upon opening a shared document.
- Observed behavior
- SharePoint does not natively display a custom pop-up dialog or alert when a user opens a file, requiring a workaround or custom development.
Since SharePoint does not feature a native out-of-the-box toggle for file-open pop-ups, implementing this requires administrative access and familiarity with SharePoint Framework (SPFx) development.
Implement a Custom SharePoint Framework (SPFx) Extension
Because SharePoint lacks a built-in feature for file-open dialogs, developers can use SPFx Application Customizers to trigger custom alerts based on specific user actions or library access.
Microsoft's modern SharePoint architecture no longer supports classic script injection on modern pages for security reasons. To show a dialog, you must deploy an SPFx Application Customizer.
This approach requires coding knowledge (TypeScript, React) and deployment through your tenant's App Catalog. It is highly recommended to test your extension in a developer tenant first.
Install Node.js, Yeoman, gulp, and the SharePoint Framework (SPFx) generator on your machine following Microsoft's official developer documentation.
Run 'yo @microsoft/sharepoint' in your command line terminal. When prompted, select 'Extension' and then 'Application Customizer'.
Use the SharePoint Framework Dialog Framework (BaseDialog) to code the custom alert or use-note. You can program the logic to check if a specific document library is being accessed before rendering the pop-up.
Package your custom solution using 'gulp bundle --ship' and 'gulp package-solution --ship', then upload the resulting .sppkg file to your SharePoint Tenant App Catalog and enable it for the target site.

Use Power Automate to Send Alerts Upon File Access
If writing custom code is not feasible, you can use a no-code Power Automate flow to send an email or Teams message with the use-notes whenever someone creates or modifies a file.
Edit Documents Effortlessly with WPS Office
While SharePoint and Microsoft Office require complex scripts or setups for custom workspace behaviors, WPS Office provides a lightweight, highly compatible alternative for everyday document editing, offline work, and straightforward team sharing.
- 1. Download and Install: Visit the official WPS Office website to download the free application for your operating system.
- 2. Open your Document: Launch WPS Office and open your Word, Excel, or PowerPoint files directly without worrying about formatting loss.
- 3. Share Securely: Use the built-in 'Share' button to generate a secure link and easily distribute the document to your colleagues.

Frequently Asked Questions
Is there a native setting in SharePoint to show a pop-up when a file opens?
No, SharePoint does not currently offer an out-of-the-box feature or a simple settings toggle to display a custom dialog box or alert when a document is opened.
Can I use classic Script Editor web parts to show a dialog?
On modern SharePoint pages, classic Script Editor web parts and traditional JavaScript injections are disabled by default for security reasons. You must use modern SPFx extensions instead.
Does Microsoft Word or Excel have a built-in open-file alert feature?
While SharePoint cannot natively pop up a dialog, you can add VBA macros to individual Microsoft Word or Excel files to show a message box upon opening. However, this requires users to actively enable macros, which is often blocked by organizational security policies.
Where can I get help building a custom SharePoint script for dialogs?
You can find implementation guidance, code snippets, and support from experienced enterprise developers in the Microsoft Tech Community or the dedicated SharePoint Development community forums.




