VarAssignment.ChangeSourceVariable



ChangeSourceVariable(bsProject As String,nNewSourceID As Long) As Boolean

Parameters

bsProject As String
Projectname as string.
nNewSourceID As Long
PvID of new source variable as string.
ED
avaliable
RT
not used

Remarks

Change source (can be member of another project).

Sample:


Sub CallChange()
	ChangeAssignment MyWorkspace.ActiveDocument.VarAssignments.Item("MyAssignment")
End Sub

Sub ChangeAssignment(zVarAssign As VarAssignment)
Dim zSrcVar As Variable
Dim zDstVar As Variable
Dim strProject As String

	Set zSrcVar = MyWorkspace.ActiveDocument.Variables.Item("WIZ_VAR_11")
	Set zDstVar = MyWorkspace.ActiveDocument.Variables.Item("WIZ_VAR_12")
	strProject = MyWorkspace.ActiveDocument.Name
	'change the source and target variable
	With zVarAssign
		.ChangeSourceVariable strProject, zSrcVar.PvID
		.ChangeTargetVariable strProject, zDstVar.PvID
	End With
End Sub


See Also

VarAssignment