C# code for MS Word

Darshak Mistry 21 Reputation points
2020-05-16T06:06:04.287+00:00

Requirement is to open stored Ms word document using client application through C# Class Library with Restricted commands of MS Word applicaton

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
39,430 questions
0 comments No comments
{count} votes

Accepted answer
  1. David 151 Reputation points
    2021-04-25T06:07:02.157+00:00

    Try Spire.Dco for .NET, which is a class library for reading and editing Word document on .NET platform. It provides a paid version as well as a commnunity version for developers to handle small documents without exceeding 500 paragraphs and 25 tables per file. The following code snippet shows you how to save Word content out in a txt file.

    //Create a Document object  
    Document document = new Document();  
    //Load a Word document  
    document.LoadFromFile(@"C:\Files\sample.docx");  
    //Save to txt   
    document.SaveToFile("ReadWord.txt", FileFormat.Txt);  
    
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Anonymous
    2020-05-18T01:48:25.743+00:00

    QnA currently supports the products listed here (more to be added) Better to reach out to subject matter experts in dedicated forums over here.

    https://social.msdn.microsoft.com/Forums/office/en-US/home?forum=worddev

    https://social.msdn.microsoft.com/Forums/en-US/home?forum=vsto

    (please don't forget to mark helpful replies as answer)

    --------------------------

    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows Server] Datacenter Management

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.

    0 comments No comments

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.