I am wondering is there a way to handle the whole process with VBscript? I have an M-Files and in VBA I am able to select the reference
After that I can use M-Files API commands to execute the code.
Dim oVaultConnections As MFilesAPI.VaultConnections
Dim oDocumentCollectionOVAP As New MFilesAPI.ObjectVersionAndProperties
Dim oOldDocumentOVAP As New MFilesAPI.ObjectVersionAndProperties
Dim oMFClientApp As New MFilesAPI.MFilesClientApplication
On Error Resume Next
Set oVault = oMFClientApp.BindToVault(szVaultName, 0, True, True)
If Err.Number <> 0 Then
' Error
Err.Number = 0
Set oVault = oMFClientApp.BindToVault(oMFClientApp.GetVaultConnectionsWithGUID(szVaultGUID).Item(1).Name, 0, True, True)
If Err.Number <> 0 Then
MsgBox "Can't connect to M-Files"
End
End If
End If
On Error GoTo 0
On Error GoTo ErrorHandler1
What about VBScript? What if I would like to create VBS file and perform all the actions with VBScript without need of VBA (for Example Excel file)?
In VBScript I have to get all objects by something like:
Set MFiles = CreateObject("Scripting.MFiles")
Is it possible somehow to get it by location of dll? What if my version will change from 19.9.8227.13? Path will be different?