Skip to content

Instantly share code, notes, and snippets.

@2lazy2debug
Created August 28, 2019 06:50
Show Gist options
  • Save 2lazy2debug/a80ddb1fa7b0e7f69f519148151b8cc1 to your computer and use it in GitHub Desktop.
Save 2lazy2debug/a80ddb1fa7b0e7f69f519148151b8cc1 to your computer and use it in GitHub Desktop.
Get count of collection members
Dim CountOfMembers
Dim propValues : Set propValues = Vault.ObjectPropertyOperations.GetProperties(ObjVer)
Dim propValue : Set propValue = propValues.SearchForPropertyEx(MFBuiltInPropertyDefCollectionMemberDocuments,true) '46 = MFBuiltInPropertyDefCollectionMemberDocuments
If IsNull(propValue) Then
CountOfMembers = -1
Else
Dim value : Set value = propValue.TypedValue
Dim Lookups : Set Lookups = value.GetValueAsLookups()
CountOfMembers = Lookups.Count
End If
output = CountOfMembers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment