Edit a Word document within the browser

Sunil Ferro 1 Reputation point
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.

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,246 questions
Office Management
Office Management
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Management: The act or process of organizing, handling, directing or controlling something.
1,996 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Lan Huang-MSFT 25,386 Reputation points Microsoft Vendor
    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.