Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
This page explains how to work with Office Add-ins that incorporate Aspose.Words.
Sometimes you might want to give access to interface controls that run code to modify documents. Aspose.Words API provides the WebExtensions namespace, which grants various classes to customize elements and attributes extending the XML vocabulary for representing Office Add-ins.
WebExtensions namespace can be conditionally divided into:
The task panes are interface surfaces that are displayed on the right side of the window in Microsoft Word. Task pane allows users to access interface controls that can run code to modify documents.
For example, using Aspose.Words API, you can add a task pane add-in and customize its appearance.
Web Extensions are tools that expand the capabilities of Office applications and interact with Office document content. Web Extensions provide additional functionality to Office clients for improving user experience.
Aspose.Words provides the ability to add Web Extensions of the Task Pane type using the WebExtension and TaskPane classes, and also allows you to customize the pane and extension properties.
The following code example shows how to create task panes and add to web extension task panes with basic properties:
To see a list of task pane add‑ins, use the getWebExtensionTaskPanes() property.
The following code example shows how to get such a list of add-ins:
Q: How do I add a Task Pane add‑in to a Word document using Aspose.Words for Java?
A: Create a TaskPane object and add it to the document with doc.getWebExtensionTaskPanes().add(taskPane). Then set up the add‑in through taskPane.getWebExtension(), e.g., getReference().setId(...), getReference().setStore(...), and getReference().setStoreType(...). The API handles the required XML for the add‑in.
Q: Which class lets me retrieve the list of Task Pane add‑ins already present in a document?
A: Use the Document.getWebExtensionTaskPanes() property. It returns a TaskPaneCollection of TaskPane objects that represent each task pane defined in the document.
Q: Can I customize the appearance (size, visibility, docking state) of a Task Pane programmatically?
A: Partly. TaskPane has setDockState, isVisible(boolean), setWidth, setRow, and isLocked(boolean); there is no height setting. Set them on a TaskPane from doc.getWebExtensionTaskPanes(). These properties control how the pane is displayed in Word.
Q: Is it possible to add other types of Web Extensions (e.g., content add‑ins) with Aspose.Words for Java?
A: Aspose.Words currently supports only the Task Pane type of Web Extensions. For other extension types you would need to manipulate the underlying XML manually, which is not covered by the high‑level API.
Q: Do I need a licensed version of Aspose.Words to use Web Extensions?
A: Not to use the feature. Without a license, Aspose.Words for Java works in evaluation mode with full functionality, but it adds an evaluation watermark and limits the document size to a few hundred paragraphs. To remove these limitations, apply a license: License license = new License(); license.setLicense("Aspose.Words.Java.lic");.
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.