We are using a software that gives you the capability to extend its functionality via an integrated VBS editor. Inside this system I need to script an interface to our SharePoint online using CSOM to check up some files and folders.
My problem is that I can't find a way to create the necessary COM objects. I was trying the answer posted by Nilpo towards a somewhat similar question Using DLLs in VBScript but it doesn't work.
Dim CTX
Dim CSOMBasePath
CSOMBasePath = "C:\MyPath\Microsoft\SharePoint SDK\Microsoft.SharePointOnline.CSOM.16.1.21116.12000\lib\"
on error resume next
Set CTX = GetObject(CSOMBasePath & "net40-full\Microsoft.SharePoint.Client.dll", "SharePoint.Client.ClientContext")
Set CTX = GetObject(CSOMBasePath & "net40-full\Microsoft.SharePoint.Client.dll", "ClientContext")
Set CTX = GetObject(CSOMBasePath & "net40-full\Microsoft.SharePoint.Client.dll", "Client.ClientContext")
Set CTX = GetObject(CSOMBasePath & "net40-full\Microsoft.SharePoint.Client.dll", "Microsoft.SharePoint.Client.ClientContext")
Set CTX = GetObject(CSOMBasePath & "net45\Microsoft.SharePoint.Client.dll", "SharePoint.Client.ClientContext")
Set CTX = GetObject(CSOMBasePath & "net45\Microsoft.SharePoint.Client.dll", "ClientContext")
Set CTX = GetObject(CSOMBasePath & "net45\Microsoft.SharePoint.Client.dll", "Client.ClientContext")
Set CTX = GetObject(CSOMBasePath & "net45\Microsoft.SharePoint.Client.dll", "Microsoft.SharePoint.Client.ClientContext")
Set CTX = GetObject(CSOMBasePath & "netstandard2.0\Microsoft.SharePoint.Client.dll", "SharePoint.Client.ClientContext")
Set CTX = GetObject(CSOMBasePath & "netstandard2.0\Microsoft.SharePoint.Client.dll", "ClientContext")
Set CTX = GetObject(CSOMBasePath & "netstandard2.0\Microsoft.SharePoint.Client.dll", "Client.ClientContext")
Set CTX = GetObject(CSOMBasePath & "netstandard2.0\Microsoft.SharePoint.Client.dll", "Microsoft.SharePoint.Client.ClientContext")
If CTX Is Nothing Then
MsgBox "No CTX"
End If