I'm trying to load variables of datacards in Excel, in order to print them (some kind of history of checks and approvals of a file).
First I was using GetVar, which is working, but is not the most convenient way to load variables of older versions of a file I guess.
Now I'm trying with GetVersionVars, see my code below. I'm not sure what to do with 'RetVariables' in order to get the script working.
Compile error: Type mismatch: array or user-defined type expected. I tried to dim 'RetVariables' as array, but Í don't know what the
size must be.
Is it also possible to get a certain variable, like 'author', or should I search afterwards for this variable?
Also, I'm not sure how to get the folderID.
I hope someone can help me with this. I'm not sure if what I want is possible with Excel.
Dim objVault As IEdmVault8
Dim VaultName As String
VaultName = Worksheets("Settings").Range("C2").Text
Set objVault = New EdmVault5
objVault.LoginAuto VaultName, 0
Dim FileName As String
FileName = Application.GetOpenFilename("All Files (*.*),*.*")
If FileName = "False" Then
Dim objFile As IEdmFile8
Dim objFolder As IEdmFolder5
Set objFile = objVault.GetFileFromPath(FileName, objFolder)
Dim varComponentEnum As IEdmEnumeratorVariable7
Set varComponentEnum = objFile.GetEnumeratorVariable
Dim Version As Integer
'Dim FolderID As Integer
Dim RetVariables As IEdmVariableValue6
Dim RetConfigs As String
Dim RetData As EdmGetVarData
Version = 0
Dim FolderID As Long
FolderID = objFolder.GetCardID(".")
varComponentEnum.GetVersionVars Version, FolderID, RetVariables, RetConfigs, RetData