AutoOpen does not work always reliable for dot templates

Hi,
we are using the latest version of Aspose.Words for Java. It seems we have found a serious bug with macro handling.
We detect a problem when saving a dot based template as doc or docm.

Problem: The AutoOpen macros is not called automatically anymore. It seems that this behaviour depends on the template file.

We have two dot-files:

  • AutoOpenOk.dot
  • AutoOpenFail.dot

Test step 1 - Manual test in Word:
Note: Same result behaviour if output format docm is used istead of doc

  • Open AutoOpenOk.dot in Word
  • Save AutoOpenOk.dot as AutoOpenOk.doc
  • Close Word
  • Open AutoOpenOk.doc in Word
    Result: OK - AutoOpen will be called (shown message box)
  • Open AutoOpenFail.dot in Word
  • Save AutoOpenFail.dot as AutoOpenFail.doc
  • Close Word
  • Open AutoOpenFail.doc in Word
    Result: OK - AutoOpen will be called (shown message box)

Test step 2 - Generate doc per Aspose:
Note: Same result behaviour if output format docm is used istead of doc

  • Generate doc per Aspose
    Code:

Document documentDOT_ok = new Document(path + “AutoOpenOk.dot”);
documentDOT_ok.save(path + “AutoOpenOkAspose.doc”);
Document documentDOT_fail = new Document(path + “AutoOpenFail.dot”);
documentDOT_fail.save(path + “AutoOpenFailAspose.doc”);

  • Open generated AutoOpenOkAspose.doc in Word
    Result: OK - AutoOpen will be called (shown message box)
  • Open generated AutoOpenFailAspose.doc in Word
    Result: FAIL - AutoOpen will not be called (message box is not shown)
    Note: Same result behaviour if output format docm is used istead of doc

Note:

  • I have tested all patches and i have realised, that this problem exists since version 20.3
    In Version 20.2 the AutoOpen will be called in generated AutoOpenFail.doc automatically.
    In 20.3 this does not works anymore!
  • Obviously this problem is related to WORDSNET-20018 “AutoOpen Macro does not work after calling VBAProject.Clone using C#”. Probably this info helps.
  • If template is based on dotm instead of dot this problem does not occure

Do you know the reason, why AutoOpen will not be called in generated AutoOpenFail.doc?
Maybe you can identify the difference between AutoOpenOk.dot and AutoOpenFail.dot?
It would be great if there is a possibility to modify AutoOpenFail.dot so it works.
Saving as dotm is not our preferred solution.

Attachment for test:
Aspose.zip (43.8 KB)

Kind regards
Matthias

@curmas
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): WORDSNET-26606

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

The issues you have found earlier (filed as WORDSNET-26606) have been fixed in this Aspose.Words for Java 24.4 update.