The DocEnd macro is triggered by closing the current document (project), either...

  • when you exit Origin.
Exiting Origin by
  • selecting File:Exit,
  • clicking the Origin close window Closewin.PNG system icon,


  • issuing the exit command,

...triggers execution of the DocEnd macro.

  • when a new project is opened.
Origin only allows one project to be open at a time, so opening a new project necessitates closing the current project. Consequently, opening a new project by
  • selecting File:New or File:Open from the Origin main menu,
  • clicking the New Project Newproj.PNG button or the Open Open.PNG button,


... triggers execution of the DocEnd macro.

The DocEnd macro is unique in that a define statement for the DocEnd macro is contained in the file MACROS.CNF (found in the Origin software folder). MACROS.CNF is read when Origin starts. The definition for DocEnd (the default definition does nothing) can be commented out or modified as desired.