com.aspose.words
Class WebExtensionProperty

java.lang.Object
    extended by com.aspose.words.WebExtensionProperty

public class WebExtensionProperty 
extends java.lang.Object

Specifies a web extension custom property.

Constructor Summary
WebExtensionProperty(java.lang.String name, java.lang.String value)
           Creates web extension custom property with specified name and value.
 
Property Getters/Setters Summary
java.lang.StringgetName()
voidsetName(java.lang.String value)
           Specifies a custom property name
java.lang.StringgetValue()
voidsetValue(java.lang.String value)
           Specifies a custom property value.
 

Constructor Detail

WebExtensionProperty

public WebExtensionProperty(java.lang.String name, java.lang.String value)
Creates web extension custom property with specified name and value.
Parameters:
name - Property name.
value - Property value.

Example:

Shows how to create add-ins inside the document.
Document doc = new Document();

// Create taskpane with "MyScript" add-in which will be used by the document
TaskPane myScriptTaskPane = new TaskPane();
doc.getWebExtensionTaskPanes().add(myScriptTaskPane);

// Define task pane location when the document opens
myScriptTaskPane.setDockState(TaskPaneDockState.RIGHT);
myScriptTaskPane.isVisible(true);
myScriptTaskPane.setWidth(300.0);
myScriptTaskPane.isLocked(true);
// Use this option if you have several task panes
myScriptTaskPane.setRow(1);

// Add "MyScript Math Sample" add-in which will be displayed inside task pane
WebExtension webExtension = myScriptTaskPane.getWebExtension();

// Application Id from store
webExtension.getReference().setId("WA104380646");
// The current version of the application used
webExtension.getReference().setVersion("1.0.0.0");
// Type of marketplace
webExtension.getReference().setStoreType(WebExtensionStoreType.OMEX);
// Marketplace based on your locale
webExtension.getReference().setStore(Locale.getDefault().getDisplayName());

webExtension.getProperties().add(new WebExtensionProperty("MyScript", "MyScript Math Sample"));
webExtension.getBindings().add(new WebExtensionBinding("MyScript", WebExtensionBindingType.TEXT, "104380646"));

// Use this option if you need to block web extension from any action
webExtension.isFrozen(false);

doc.save(getArtifactsDir() + "Document.WebExtension.docx");

Property Getters/Setters Detail

getName/setName

public java.lang.String getName() / public void setName(java.lang.String value)
Specifies a custom property name

getValue/setValue

public java.lang.String getValue() / public void setValue(java.lang.String value)
Specifies a custom property value.

See Also:
          Aspose.Words Documentation - the home page for the Aspose.Words Product Documentation.
          Aspose.Words Support Forum - our preferred method of support.