|
ED
|
avaliable
|
RT
|
not used
|
With this method you are able to create an array variable within
a project.
Sub CreateArrayVariable() Dim zVariables As Variables 'Object from type Variables Dim zVariable As Variable 'Child object from type Variables Dim i As Integer 'Fill the objects Set zVariables = MyWorkspace.ActiveDocument.Variables Set zDrivers = MyWorkspace.ActiveDocument.Drivers Set zVarTypes = MyWorkspace.ActiveDocument.VarTypes 'Create a "intern driver" array variable called "ArrayVar" from object type "internal variable", datatype "INT", start at index 1, 'dimension of 5 and automatic addressing Set zVariable = zVariables.CreateArrayVar("ArrayVar", zDrivers.Item(0), 33, zVarTypes.Item("INT"), 1, 5, 0, 0, True, False, False) 'Activate all array elements For i = 0 To 4 zVariable.ActivateSubItem (i) Next i End Sub