API, sync document from M-files into another system

I'm trying to find a VBScript that can Sync a document from M-files into another system when the document is added/updated