Create, Modify and Save Word Docx files without Microsoft Office
using Sohiso.Word;
using Sohiso.Word.Documents;
using Sohiso.Word.Enums;
//Create a new document
WordDocument doc = new();
//Create a new paragraph
Paragraph paragraph = new();
//Add a line of text and then add the paragraph to the document
paragraph.AddText("Hello World!", FontStyle.Bold | FontStyle.Italic);
doc.DocumentBody.AppendParagraph(paragraph);
//Save to file
doc.Save("new_document.docx")