I have a piece of Macro which is used in a Button to select the PossibleValues for a Field/List Box. For example, data set is like this below:
SET Doc = ActiveDocument
fieldName = "Region"
'SET Field = Doc.Fields(fieldName).GetPossibleValues
I see a '*' , instead of A, B, C.
How can I see the values in a Variable or Text Object as A, B, C and NOT '*' ?
Is there any other way to pass the Possible Values from a List Box to Variable?
try to use concat(distinct Region, ',') instead of GetFieldSelections.
View solution in original post
getfieldselections() can actually take a few more parameters including one that will define 'maxvalues'.
Try entering a larger number like this:
You can also 2x check the user preferences->general->'max values for current selections' setting
getfieldselections ( FieldName [, ValueSep [, MaxValues [, State]]])
Returns a string with the current selections in a field. It is possible to query an alternate state.
ValueSep is the separator to be put between field values. The default is ', '.
Maxvalues is the maximum number of field values to be individually listed. When a larger number of values is selected the format 'x of y values' will be used instead. The default is 6.
State is the alternate state to query.
The string that is returned can be in these forms:
getfieldselections ( Year )
getfieldselections ( Year, '; ' )
getfieldselections ( Year, '; ' , 10 )