HOW TO

Load data into ArcMap at startup

Last Published: April 26, 2020

Summary

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.

Procedure

  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
     

Article ID:000002362

Software:
  • ArcMap 8 x

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Discover more on this topic