Example: Value property

This example adds an user field and sets a numeric value for it.

  TextFields fields = document.getFields();
  TextField field = fields.add(document.getParagraphs().item(1).getRange().getStart(), "User", "User_Defined_Field");
  field.setValue(20.4);

Related information

Value property