Page 1 of 1

GlossaryDocumentPart

PostPosted: Sat Apr 16, 2011 12:36 am
by Richard
Hey Jason,

is the GlossaryDocumentPart yet supported by the framework? I don't find a way to access the "/word/glossary/document.xml" part of my document. I'm trying to change the default placeholder text for content controlls, which is located in their.

I had a quick look at the DocumentPart class and coudn't found a quick link either. Can you please tell me how to load this part of the document.

Richard

Re: GlossaryDocumentPart

PostPosted: Sat Apr 16, 2011 1:01 am
by Richard
I answered my question myself. For everybody interested:

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
Parts partList = this.fWordTemplate.getParts();
Part p = partList.getParts().get(new PartName("/word/glossary/document.xml"));
 
Parsed in 0.014 seconds, using GeSHi 1.0.8.4

Re: GlossaryDocumentPart

PostPosted: Sat Apr 16, 2011 12:52 pm
by jason
Please note there exists:
Code: Select all
public final class GlossaryDocumentPart extends DocumentPart<GlossaryDocument>


which you could cast to if you wanted to use the shortcut methods such as getStyleDefinitionsPart() which are defined in DocumentPart.