Join
Sign in
Search Options
Search Everything
Search Formats
Home
Blog
Resources
Forums
About Open XML
More ...
Home
»
Forums
»
Formats
»
WordprocessingML
»
GlossaryDocumentPart is null
GlossaryDocumentPart is null
Formats
Discussions about working with different Open XML Formats
Get this RSS feed
Details
1
Reply
0
Subscribers
Posted
over 2 years ago
Options
Subscribe via RSS
Share this
WordprocessingML
GlossaryDocumentPart is null
rated by 0 users
This post has
1 Reply |
0
Followers
IngoVals
35
Posted by
IngoVals
on
Tue, Aug 10 2010 11:50 AM
rated by 0 users
Post Points: 5
GlossaryDocumentPart is null
I was wondering about how to add Building Blocks through OpenXML SDK.
After messing around with it a little I noticed that when I added Building Blocks to .dotx info about them went into word\glossary\document part of the file so I decided to add some info there.
However when I try ussing this line
document.MainDocumentPart.GlossaryDocumentPart.GlossaryDocument.DocParts.AppendChild<DocPart>(part);
I always get a null reference on GlossaryDocumentPart. When I check the underlying XML there is a glossary folder with 5 .xml files.
Is this GlossaryDocumentPart not the right thing?
IngoVals
35
Posted by
IngoVals
on
Tue, Aug 10 2010 12:00 PM
rated by 0 users
Post Points: 5
Re: GlossaryDocumentPart is null
OK please ignore this, it was a mistake on my behalf.
The path to the dotx file was wrong but I didn't get an exception on the document open method because there existed a file in the debug folder (wich didn't have a glossary part).
On another note, does the sequence of w:tags matter?
Page 1 of 1 (2 items)