It is possible, but you will need 3rd party library. In that case your code could look like this:
byte[] fileContents = Docx();
using (FileStream file = new FileStream(wordPath, FileMode.Create))
{
file.Write(fileContents, 0, fileContents.Length);
file.Close();
}
object myDataObject = new object();
DocumentGenerator dg = new DocumentGenerator(myDataObject);
MemoryStream outputDocumentStream = new MemoryStream();
dg.GenerateDocument(file, outputDocumentStream, Pdf);
See more
examples if you think this could be helpful for you.