Share via

Not able to render sharepoint file in Mac Word desktop app via word addin

RahulK 20 Reputation points
2026-05-04T15:58:21.77+00:00

We have a word addin created. Within the word addin, we have a search page which list all the records. We are using OJET component to render this list. Every record has a hyperlink(<a> tag), clicking on which the behaviour is that file content for that record is being downloaded from DB and rendered in a new Word window.

We have a new requirement, wherein we need to render the Sharepoint docx file upon clicking on the hyperlink in a new Word window.

The flow works in Windows(code which works attached below) but it is breaking in Mac. We have tried multiple approaches like openBrowserWindow, displayDialogAsync, window.location.href etc but none of them are working in Mac.

However, if we provide <a> tag's href with the actual physical location of the file, we can right click and open it in a new window. But the expectation is that it will work with a regular hyperlink link(left click) and open the file in a new window.

Please suggest the correct way to address this.

Microsoft 365 and Office | Development | Other

2 answers

Sort by: Most helpful
  1. Dora-T 13,060 Reputation points Microsoft External Staff Moderator
    2026-05-05T00:24:41.7+00:00

    Hi RahulK

    Based on my research, the different behavior you’re seeing on Mac appears to be related to how Office Add-ins are hosted there. Office Add-ins run inside a webview, and the implementation differs by platform. On Mac, the webview is based on Safari (WKWebView). Because of this, certain interactions, especially those triggered programmatically rather than directly by a user click, may not behave the same way as on Windows. 

    At this time, I was not able to find any official Microsoft documentation that confirms a supported way to programmatically open a SharePoint document in a new Word desktop window from an Office Add in on Mac.

     Given this, you may consider the following options:

    -Provide a visible hyperlink and let users click it directly 

    -Open the SharePoint URL in a browser window and let users choose Open in Desktop App from SharePoint 

    Please note that as a moderator, this is a public peer-to-peer community forum. While we can share guidance and known behaviors, we do not have access to internal systems or a test environment to validate this scenario. 

    If you need deeper insight into this behavior, I recommend posting a new thread on GitHub, where engineers and other experts may be able to provide more targeted guidance.

    Reference: Participating in a discussion - GitHub Docs.  

    Best regards, 


    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. 


  2. Q&A Assist
    2026-05-04T15:58:40.77+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    SharePoint links opened from an Office Add-in are subject to platform and client limitations, and behavior can differ between Word for Windows and Word for Mac.

    From the provided context, the only documented cross-platform behavior related to opening documents is that certain Office features and rendering paths are not yet fully implemented or are under investigation on Mac, especially around document rendering and add-ins:

    • There is an active issue where Office documents may not render as expected on older Office for Mac clients, and the status is “Investigating.”
    • There is also a known issue where Word JavaScript APIs and some add-in behaviors differ or are not implemented consistently across platforms.

    Given this, the behavior observed—working on Windows but not on Mac when trying programmatic navigation (for example, openBrowserWindow, displayDialogAsync, window.location.href) from an add-in to open a SharePoint .docx in a new Word window—is consistent with platform limitations on Mac rather than a coding error that can be fixed purely in the add-in.

    The only reliably supported behavior indicated in the context is:

    • Opening file links directly in Office desktop apps is controlled by the client’s own “File Open Preference” (Desktop vs Browser) in Word/Excel/PowerPoint for Microsoft 365 on Windows, and
    • That feature is explicitly documented only for Windows; it is not described as available or configurable on Mac.

    Because of these limitations, there is no documented, supported way in the current context to guarantee that a left-click on a hyperlink inside a Word add-in on Mac will open a SharePoint-hosted .docx directly in a new Word desktop window, even though similar logic works on Windows.

    The only behavior that is confirmed to work from the context is:

    • Using a direct file path or URL in an <a> tag that the user can right-click and choose to open, which matches what is already observed.

    Without additional platform-specific APIs or updated Mac support (which are not present in the context), there is no alternative documented pattern that will force the Mac Word client to open the SharePoint document in a new Word window via a simple left-click from within an add-in.


    References:

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.