Edit a Word document within the browser

Sunil Ferro 21 Reputation points
2022-03-07T15:46:43.14+00:00

Hi,

I have an ASP.NET web application which has a page to upload Word documents. I am looking for the ability to open/edit Word documents from within the Web application/browser itself and retain the document formatting. All this without the need to have MS Word installed.

From within the Web application, is it possible to call MS Office 365 web which will launch the Word document in a separate browser tab for the user to edit? Is a license needed for this? I think the user would need to have an Office 365 account to be able to access/edit the document. Could you please let me know?

Thank you.

Microsoft 365 and Office | Install, redeem, activate | For business | Windows
Developer technologies | ASP.NET | Other
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Lan Huang-MSFT 30,191 Reputation points Microsoft External Staff
    2022-03-08T02:47:03.787+00:00

    Hi @Sunil Ferro ,
    Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment.
    For more information, please visit Considerations for server-side Automation of Office.

    So I suggest you to use Open XML SDK to manipulate Office documents or use 3rd party library.
    You could visit Word processing (Open XML SDK) to see several samples.
    https://learn.microsoft.com/en-us/office/open-xml/word-processing?redirectedfrom=MSDN
    3rd party library:Free Spire.DocAsposetextcontrol
    Best regards,
    Lan Huang


    If the answer is the right solution, 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.


Your answer

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