The details of exactly how to start DMAP from a particular Database or Spreadsheet program will depend on the particular software being used. The general principle is very simple, but you will need to be a little bit familiar with the underlying program language used for writing Macros or Modules within that software. The general principle is that you should firstly call a function or procedure which changes the current path to that of the Dmapw directory and then call a function or procedure which launches the DMAP program (Dmapw.exe). The reason for firstly changing the current path is that DMAP looks for some of its data files in the Dmapw directory. The example given below illustrates the sort of Visual Basic code which is needed for Microsoft Access and Microsoft Excel.
The code itself can be put in a Macro or Module of its own, or it could be included at the end of a longer Macro which first exports the Distribution Data to DMAP. The Macro or Module can either be run from the appropriate Menu item, or it could be installed as a routine which acts in response to clicking a Button on a Form.
With the simple code given above, when you return to the database or spreadsheet the current path will remain at the Dmapw directory. The modified code given below will preserve the original path:
Dim OldPath As String
OldPath = CurDir()