Combo box not showing up in MS Word but its is visible in LibreOffice Writer


	Document doc = new Document();
	DocumentBuilder builder = new DocumentBuilder(doc);
	String[] items = {"One", "Two", "Three"};

	builder.write("hello world ");
	builder.insertComboBox("Drop box", items, 0);"output.docx");


Using above code of aspose java I created the document called “output.docx”.

when I open this document in “Libre Office Writer”. I can see the a functional dropdown. Attaching the image for reference.libreOffice_output_1.png (38.9 KB)
libreOfficeoutput_2.png (41.5 KB)

Now comes the problem part:

  1. If I open the same document in online MS word of office 365. The drop down is not reflected.
    attached image is for reference.msword_output.png (21.0 KB)

  2. similary I opened the same document in my Local MS word 2016 version . In that suggested word can be seen but not the drop down.
    attached image is for referencemsword_local_output.png (33.6 KB)


For the sake of any corrections in Aspose.Words for Java API, we have logged this problem in our issue tracking system. Your ticket number is WORDSNET-22851. We will further look into the details of this problem and will keep you updated here on the status of the linked issue. We apologize for any inconvenience.

  1. any estimated time for resolving the issue?
  2. and Is there anyway to make the combox much more attractive, Aesthetic wise

@cacglo Our developers completed analyzing the issue and concluded this is not a bug. As follows from the method summary, DocumentBuilder.InsertComboBox() inserts a combobox form field at the current position.
This form is successfully displayed and edited in all MS Word 2003-2019 versions
Word_2003.png (35.7 KB)

By double-clicking on the form or by right-clicking → Properties.

A combobox is drawn in Libre Office.
Libre.png (30.2 KB)

Office 365 web version does not display legacy field forms, only those based on Structured Documents Tags.

Answering your second question, no, there is no way to control form fields view. However you can control font and size of form fields using properties of FormField class.

Could share java code example for combox using Structure Documents tag.I couldn’t find any example pertaining to that in the documenation

@cacglo You can create Structured Document Tag of combo box type using code like the following:

Document doc = new Document();

StructuredDocumentTag sdtCombo = new StructuredDocumentTag(doc, SdtType.COMBO_BOX, MarkupLevel.INLINE);
for (int i = 0; i < 10; i++)
    sdtCombo.getListItems().add(new SdtListItem("item_" + i));


Please see API References fore more information.