VarType.IsAllowed



IsAllowed(lpDriver As LPDISPATCH,kTypes As tpKanaltypes) As BOOL

Parameters

lpDriver As LPDISPATCH
Needs a driver as an object. Example: zDrivers.Item(0)
kTypes As tpKanaltypes
Channel type as a constant.

List of constants: tpKanaltypes
ED
avaliable
RT
avaliable

Remarks

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.

Sample:


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

See Also

VarType