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

New document does not have same font as inserted document

Aug 5, 2010 at 9:26 PM

I am creating some simple form letters. I create a new document then load in text from a template appending it to the new document. The font of my source documents is "Times New Roman", however when I open the resulting document the font is "Calibri (Body)". In my application each resulting document may be built from multiple source documents, each controlling the font of its portion of the resulting document.

// Create the resulting document
DocX output = DocX.Create(fullName);

foreach (DataRow r in dp.getTemplates().Tables[0].Rows)
    string tempName = (string)r["DocTemplate"];
    string tempPath = (string)r["DocPath"];
    string tempSQL = (string)r["DocSQL"];

    // Get list of template documents to be appended to resulting document
    dp.loadData(tempSQL, keyValue);

    // If document parts were found, append them to resulting document
    if (!dp.getData().Tables[0].Rows.Equals(0))
        string fullTemp = tempPath.Trim() + "\\" + tempName.Trim() + ".docx";
        DocX work = DocX.Load(fullTemp);

// Save the resulting document

I have downloaded the help file, but each page I attempt to access says:

<!-- This row is for HTTP status code, as well as the divider--> <!-- Error Body --><!-- What you can do --> <!-- refresh page -->

Navigation to the webpage was canceled


What you can try:


Retype the address.<noscript id="refreshPage"></noscript>

Can someone please point me in the right direction. 




Chicago, IL

Aug 7, 2010 at 10:37 PM

I can help you with help file. You need to right click it and choose Properties, and then on the first page you have to uncheck or check (don't remember now) option that the document is trusted. This will allow you to use the docs properly.