VarAssignments.CreateByID



CreateByID(bsName As String,nSourceID As Long,nTargetID As Long) As VarAssignment

Parameters

bsName As String
Name of Assignment as string.
nSourceID As Long
PvID of source variable as string.
nTargetID As Long
PvID of target variable as string
ED
avaliable
RT
not used

Remarks

Creates and returns a new Object.

Sample:


'Create a new VarAssignment (Allocation)
Sub CreateAssignment()
Dim zVarAssign As VarAssignment
Dim zSrcVar As Variable
Dim zDstVar As Variable
	'OR by ID
	Set zSrcVar = MyWorkspace.ActiveDocument.Variables.Item("WIZ_VAR_10")
	Set zDstVar = MyWorkspace.ActiveDocument.Variables.Item("WIZ_VAR_11")
	Set zVarAssign = MyWorkspace.ActiveDocument.VarAssignments.CreateByID("MyAssignment", zSrcVar.PvID, zDstVar.PvID)
End Sub


See Also

VarAssignments, VarAssignment