My team is also very interested in this. We have discovered that it is almost completely possible with the current CustomPart framework. The one thing that’s missing is the ability to set the parent reference. These methods are not publicly exposed by your API. In com.aspose.words.CustomPart, the methods appear to me as zzVX(String) and zzoD() that wrap member zz52. If I manually enter this data via debugging, the resulting docx file correctly embeds my apps for Office task pane. While a deepClone() of an existing instance also works, we’d rather not have to have a template docx but rather build the CustomPart ourselves. Here’s our code that performs the copy at this point:
Thank you for adding my details to the ticket!
We would like to share with you that support of
Web Extensions was added in Aspose.Words for Java 19.12. The document class provides a Document.WebExtensionTaskPanes property which returns a list of task pane add-ins.
Please read following article for more detail.
Work with Web Extensions
The following code example shows how to create task panes and add to web extension task panes.
Document doc = new Document(); TaskPane taskPane = new TaskPane(); doc.getWebExtensionTaskPanes().add(taskPane); taskPane.setDockState(TaskPaneDockState.RIGHT); taskPane.isVisible(true); taskPane.setWidth(300); taskPane.getWebExtension().getReference().setId("wa102923726"); taskPane.getWebExtension().getReference().setVersion("184.108.40.206"); taskPane.getWebExtension().getReference().setStoreType(WebExtensionStoreType.OMEX); taskPane.getWebExtension().getReference().setStore("th-TH"); taskPane.getWebExtension().getProperties().add(new WebExtensionProperty("mailchimpCampaign", "mailchimpCampaign")); taskPane.getWebExtension().getBindings().add(new WebExtensionBinding("UnnamedBinding_0_1506535429545", WebExtensionBindingType.TEXT, "194740422")); doc.save(dataDir + "output.docx", SaveFormat.DOCX);