import com.aspose.words.BreakType; import com.aspose.words.Document; import com.aspose.words.DocumentBuilder; import com.aspose.words.License; import com.aspose.words.TextFormFieldType; public class MakeAFillableFormInWord { public static void main(String[] args) throws Exception {//main function for how to make a fillable form in Word using Java // Load license License lic = new License(); lic.setLicense("Aspose.Total.lic"); // Create a document Document formDoc = new Document(); // Create a DocumentBuilder object DocumentBuilder formBuilder = new DocumentBuilder(formDoc); // Insert text input formBuilder.insertTextInput("TxtInputControl", TextFormFieldType.REGULAR, "", "The Text Input Control", 0); formBuilder.insertBreak(BreakType.LINE_BREAK); // Insert checkbox formBuilder.insertCheckBox("CheckBoxControl", true, true, 0); // Save the document formDoc.save("outputJava.docx"); System.out.println("Done"); } }