Run macro when I open a file

How can i get a macro to run when I open any file? I understand how to use the event handler to run a macro when i open a specific file, but what I need to do is have a macro run when any file is opened. I know this is possible in excel with the Personal Macro Workbook, is this possible in Corel?

  • Here's an example -- running a sub named updateProps whenever a document is opened.

    Private Sub GlobalMacroStorage_DocumentOpen(ByVal Doc As Document, ByVal FileName As String)
       updateProps
    End Sub

    The above code  needs to go in the GlobalMacroStorage of a new GMS file.

    The sub should also be in GlobalMacroStorage :

    Sub updateProps

         .....  'put your macro code here

    End Sub

     

    I think the above will also work in X5, but I've only used it myself in X6 and X7.