I have a piece of VBScript code which is used as a macro. Can somehow it be converted to JScript?
The reason being, in that space, a lot of other JScripts are running and both VBScript and JScript are not supported at same time.
Here is the VBScript below. Please help.
SUB SelectValues SET Doc = ActiveDocument fieldName = "BookmarkFieldName" SET Field = Doc.Fields(fieldName).GetPossibleValues
FOR index = 0 to Field.Count-1 Doc.Fields(fieldName).Clear Doc.Fields(fieldName).SELECT Field.Item(index).Text fieldName1 = "BookmarkFieldValue" SET Field1 = Doc.Fields(fieldName1 ).GetPossibleValues Doc.Fields(Field.Item(index).Text).SelectValues Field1 Doc.Fields(fieldName).Clear NEXT END SUB