Microsoft Word contains a Visual Basic programming (known as scripting) platform most commonly used with its macro recording / playback functionality. Scripting is supported by datamap via events which are raised at specific moments in the processing workflow, which you can handle to customise many aspects of the data capture, result properties, and export. For example:

  • Choosing to skip certain documents in the processing folder
  • Formatting certain results to guarantee a consistent output
  • Excluding certain results based on position or complex factors
  • Creating a connection to a database rather than writing the results to Excel

The following sections describe the overall flow and each specific event handler that you can implement:

  • Event Flow
  • RibbonLoad_BeforeFolderSet
  • RibbonLoad_BeforeUserSet
  • RibbonLoad_BeforePasswordSet
  • RibbonLoad_BeforeDocumentTypeSet
  • ProcessFolder_BeforeIncludeSkipDoc
  • ProcessDocument_BeforeRunMaps
  • RunMapSet_BeforeRegexSetCase
  • RunMapSet_BeforeRunFind
  • RunMapSet_BeforeResultFormatText
  • RunMapSet_ResultsReady
  • ProcessDocument_AfterRunMaps

Event Flow

The following diagram illustrates the order of processing, the various events raised when the software reaches a given milestone, and the purpose of handling the event in code. Of course there are usually several (or in some cases an open-ended) number of things you can do in these event handlers – the diagram simply states the main purpose based on the function return value.

Figure 1 – the flow and main purpose of handling each event