One variable will always store only one value. Despite this, you can set a variable to get the value stored formatted so it can be later used in an expression:
SET vLetters = 'A','B','C';
So there's only one value, but formatted so it can be used in some functions or set analysis.
If you mean you want to keep the value stored in one variable and append to it some other value, try something like
Sub AddLetters Set v = ActiveDocument.Variables("vLetters") vOld = v.GetContent.String vNew = "'D'" v.SetContent vOld & "," & vNew, trueEnd Sub
Or better use one Action, External, Set Variable, the name of the variable and the value to
=vLetters & chr(44) & chr(39) & 'E' & chr(39) // Will add ",'E'"
Hope that helps.
Is that someting like...
'get a field to iterate throught values
set graphIdField = ActiveDocument.Fields("graphId")
set graphIdVals = graphIdField.GetPossibleValues
'create an empty string
str = ""
For i=0 to graphIdVals.Count-1
'concatenate the value of the string to this string
str = str & " " & graphIdVals.Item(i).Text
'setting the value to the variable used in the text object
set var = ActiveDocument.getVariable("vText")
var.setContent str, false