Word captions removed by M2Doc

Hi all,

I have the problem that any captions I create in my template are removed by M2Doc and converted into static text, e.g. Figure { SEQ Figure \* ARABIC}: Title is converted to Figure 1: Title in every case of my document and therefore, the table of figures is empty in the generated document, while it shows all links correctly in the template.

After some research in the forum I saw that this is indeed an M2Doc problem (https://forum.mbse-capella.org/t/postprocessing-of-m2doc-documents-by-visual-basic/449). However, it is not yet clear to me if this bug is fixed, in what version this bug is fixed and if this version is compatible with the Capella version I’m using (kind of fixed on the Capella, unfortunately). I’m using Capella 1.4.2 and M2Doc 3.1.1.

Thanks and best regards,
Jamo

This bug is not fixed yet:

You can have a list of all opened bugs here.
You can update your version of M2Doc to the last version 3.2.0 by using the following update site:
https://s3-eu-west-1.amazonaws.com/obeo-networkaggregation-releases/capella-extensions/1.4.1_M2Doc3.2.0/full
If you need the zipped version or an other version of the M2doc Capella extensions you can have a look at this page.
Updating M2Doc will not fixe this issue, but it will given you access to the new M2Doc interpreter view which can be handy to write AQL expressions and see the result in the context of your .genconf file.

1 Like

Hi Yvan I have an update from my side. Apparently the bug does NOT appear when using Office 2010 instead of Office 2016. A colleague and I found this out by chance (both with capella 1.4.2 and M2Doc 3.2.0). Maybe something essentially changed between versions in how Word processes fields which M2Doc does not recognize correctly anymore.

Thank you for this input. Can you provide a document with a figure reference made with MS Word 2010 and another one made with MS Word 2016 ?
You can attach them to the following issue:


That will help me to figure out how to fix this bug.

Uploaded example templates and their resulting generated documents

Another note: When editing the 2010 file with Word 2016 the export does NOT work correctly anymore. However, if I edit the file afterwards again with Word2010 it’s fine. So I assume there is some metadata between 2010 and 2016, because I only did "fake"changes. E.g. adding a word, saving, deleting the word again, saving. So the content is the same, but something is different depending on which word you use to save the file.

Thank you for your help. That something I’ll have to check, also M2Doc rely on Apache POI to read/write the MS Word document. So some limitations might come from POI.