How To: Load data into ArcMap at startup


You can add VBA code to the MxDocument's NewDocument event, so when ArcMap starts without referencing an existing document.mxd, the NewDocument event code will be executed.


  1. Start the Visual Basic Editor.
    In ArcMap, select Tools > Macros > Visual Basic Editor.
  2. In the View menu > Properties window, open the code for Normal > Arcmap Objects > ThisDocument.
  3. At the top of the Normal.mxt - ThisDocument (Code) window, choose MxDocument as the object and NewDocument as the event.
  4. Add code to load data into the ArcMap document

    See: HowTo: Add feature classes to ArcMap using VBA