|
ED
|
avaliable
|
RT
|
avaliable
|
This method returns -1 when a datatype is supported by a drivers object type. It returns 0 when a drivers object type is not supported.
Sub IsAllowed() Dim zVarTypes As VarTypes 'Object from type VarTypes Dim zVarType As VarType 'Child object from type VarTypes Dim zDrivers As Drivers 'Object from type Drivers 'Fill the objects Set zVarTypes = MyWorkspace.ActiveDocument.VarTypes Set zDrivers = MyWorkspace.ActiveDocument.Drivers 'Read the datatype STRING from the list. Set zVarType = zVarTypes.Item("STRING") 'Check if the datatype is supported by the drivers object type Debug.Print "Is allowed = " & zVarType.IsAllowed(zDrivers.Item(0), 1) End Sub