Hello,
I'm trying to read Word 2007 docx document.
The document looks fine inside Word, but when i try to read id using my code, all Run objects have RunProperites set null.
The property that I'm most interested in is RunProperies.FontSize, but unfortunately it is null as well, the only property I can access is InnerText.
My Code looks like this:
using (WordprocessingDocument doc = WordprocessingDocument.Open(filename, true))
{
MainDocumentPart mainPart = doc.MainDocumentPart;
IList<Paragraph> paragraphList = doc.MainDocumentPart.Document.Body.Elements<Paragraph>().ToList<Paragraph>();
foreach (Paragraph pr in paragraphList)
{
IList<Run> runList = pr.Elements<Run>().ToList<Run>();
foreach (Run r in runList)
{
// Some logic
}
}
}
I've minimized my document to as simple as possible, and it looks like this http://dl.dropbox.com/u/204110/test.docx
I have similar document which is read fine. Is it possible that there is a bug in OpenXML SDK 2?
Has anyone had similar problems? Any help would appreciated. Thank You!