Ram Prasad

Ram Prasad

  • NA
  • 326
  • 18.2k

Console.Output to Word file

Jan 22 2020 6:17 AM
Looking for some help to figure out on how can I save the output of my C# program into the word file?
  1. class Test  
  2. {  
  3. static void Main(string[] args)  
  4. {  
  5. Application app = new word.Application();  
  6. Document doc = app.Documents.Open(filePath);  
  7. ////Lines of Code  
  8. Console.WriteLine(); //Output  
  9. //How to save the above Console.Writeline in the word file??  
  10. Doc.close();  
  11. App.Quit(); } }  

Answers (8)