Creating tasks in Outlook from an external data source

I’ve had this script for many years but currently I don’t have a use for it so I’m getting rid of it but putting it here for future reference in case I need it again.

It’s got code to retrieve data from a database and convert it to a tab delimited string.  There’s more code which then parses this into tasks.  The upshot of this is that I’ve used it in the past to take data from the clipboard (having come from excel).

The code has been anonymised which will have introduced a bug or two but the gist of it is valid.