Aspose.word retrieve the list of constructionblocks available in a document

Hello,

As said in the title, i’m trying to list every constructionblock available inside a document using the Document.GlossaryDocument.BuildingBlocks property.

var myDocument = new Document("Autotext.docx");
var glossary = myDocument.GlossaryDocument;

However in my example myDocument.GlossaryDocument is null while my document seems to contain construction blocs and i don’t understand where the problem is…

can you help me ?

Here is the original file.
autotext.docx (12.4 KB)

Sincerely.

@guyyyyyyyyyyy The attached document does not have GlossaryDocument, you can check this by unzipping the document and discovering internal document structure.
The document with glossary document has the following folder structure:

In your case it looks like this:

Also, usually templates contain building blocks, like AutoText, AutoCorrect entries, i.e. DOTX or DOT files.

1 Like

Thanks for your help, indeed my construction blocs where contained inside an other file.

1 Like