This project has moved and is read-only. For the latest updates, please go here.

How can i write a byte array and string into a document ?

Sep 10, 2014 at 2:42 PM
The code which I am using is like this:
    public void CreateSampleDocument()
        // Put the Reading file
        var qblob = File.ReadAllBytes(@"E:/MedicalProj/tempQstnSmall.docx"); 

        // Modify to suit your machine:
        string fileName = @"E:\MedicalProj\Answer1_Write.docx";

        // Create a document in memory:
        var doc = DocX.Create(fileName);

        // Insert a paragrpah:
        doc.InsertParagraph("This is my first paragraph");
        //Wan to insert the byte [] (which is a word byte ) after the paragraph

        // Save to the output directory:

        // Open in Word:
        Process.Start("WINWORD.EXE", fileName);
Any solutions to do this??