Strange Macro Behaviours in Designer X7

Hi guys,

over the past months we've encountered several strange behaviours in our Designer macros.

Those macros were all running fine in X6, but are now going more and more wild with every slight change to our infrastructure.

Latest and most annoying example is the OpenDocument method.

While our original macro saved the current document, closed it and opened our template again - this has not been working anymore after upgrading to X7:

Original code:


    answer = MsgBox("Dokument schliessen und Vorlage öffnen?", vbQuestion + vbYesNo, "Nachfrage")
    If answer = 6 Then
        ActiveDocument.Dirty = False
        ActiveDocument.Close
        Application.OpenDocument ("D:\ST4_Grafiken\00_Vorlage\Vorlage.des")
    End If

Unload saveDocument_Form

Interesting enough, this actually works if there is already another document opened.

To work around this, we've set up a small macro that does the opening of the template by a single button press:


Public Sub openVorlage()
  Application.OpenDocument ("D:\ST4_Grafiken\00_Vorlage\Vorlage.des")
End Sub

This works for the combination X7 and Windows 7 - it does not for an installation under Windows 10. We're getting some obscure time out error when executing it.

Even more strange is the fact, that the original macro (the first snippet I posted) does not return this error. Instead it keeps the form it's called in open and does not execute the Unload command, while still not loading the template.

Any ideas?

-Alex