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

Noob Error

Jun 9, 2009 at 6:10 PM

Hello Cathal,

I have the following code:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DocumentFormat.OpenXml;
using Novacode;

namespace testApp
    class Program
        static void Main(string[] args)
            DocX document = DocX.Load(@"c:\test.docx");

when I try to compile this app, I get the following error:

I have the DLL referenced and installed the Office 2007 SDK and everything seems fine.

Would appreciate help. Thanks!

Jul 1, 2009 at 9:21 PM

Hello cygnus2936,

Sorry it took me so long to reply. I have moved house and job this month, so I have not been very active with DocX.

It seems like the document is not a valid .docx file. Can you send me a copy of the document you are trying to load? You can email it to Can you also try creating a new document using Office 2007 and loading that instead.

kind regards,

Jul 3, 2009 at 9:45 AM

Hello again cygnus2936,

someone else reported a very simular error a few months ago. I think your problem is that you are using an old version of the OOXML SDK. Please download the newest version of DocX (v1.0.0.5). This and later versions of DocX, no longer have a dependency on the OOXML SDK.

kind regards,