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

Bug in DocX.Load(String filename) version 1.0.0.10

Jun 29, 2010 at 3:36 AM

Hi

I got exception when using new version 1.0.0.10 at DocX.Load

System.NullReferenceException was unhandled by user code
 "Object reference not set to an instance of an object."
 

And here is error in Paragraph.cs file:

public List<Picture> Pictures
{
get
{
List<Picture> pictures =
(
from p in Xml.Descendants()
where (p.Name.LocalName == "drawing")
let id =
(
from e in p.Descendants()
where e.Name.LocalName.Equals("blip")
select e.Attribute(XName.Get("embed", "http://schemas.openxmlformats.org/officeDocument/2006/relationships")).Value
).Single()
let img = new Image(Document, mainPart.GetRelationship(id)) -> Object reference not set to an instance of an object
select new Picture(Document, p, img)
).ToList();


return pictures;
}

I haven't found any solution yet.

 

Jun 29, 2010 at 9:56 AM
Hi dienhs,

please send me the file and the code used to reproduce this error.

Thanks,
Cathal
Jul 4, 2010 at 9:26 PM
Edited Jul 4, 2010 at 9:26 PM

Hello,

I'm having the same problem. Can't load documents. Sending you email with docx that causes problems (I've got lots of them like that).

With regards,

MadBoy

Jul 30, 2010 at 3:19 PM
Edited Jul 30, 2010 at 3:21 PM

Sorry - wrong place...