VarTypes.CreateSimpleType



CreateSimpleType(pBaseType As VarType,bstrTypeName As String) As VarType

Parameters

pBaseType As VarType
Needs an item from type VarType to set the base type of the own created datatype.
bstrTypeName As String
A string which defines the name of the simple datatype.
ED
avaliable
RT
not used

Remarks

With this method a simple datatype can be created.

Sample:


Sub CreateSimpleType()

Dim zVarTypes As VarTypes   'Object from type VarTypes
Dim zVarType As VarType 'Child object from type VarTypes
Dim zVarTypes_1 As VarTypes
Dim zVarType_1 As VarType

'Fill the objects
Set zVarTypes = MyWorkspace.ActiveDocument.VarTypes
Set zVarTypes_1 = MyWorkspace.ActiveDocument.VarTypes

'Read datatype "UINT"
Set zVarType_1 = zVarTypes_1.Item(1)

'Create a simple datatype from type "UINT" called "SimpleType_1"
Set zVarType = zVarTypes.CreateSimpleType("SimpleType_1", zVarType_1)

End Sub

See Also

VarTypes, VarType