CustomXmlPart.namespaceManager property (JavaScript API for Office v1.1)

JavaScript API for Office v1.1

Gets the set of namespace prefix mappings (CustomXMLPrefixMappings) used against the current CustomXMLPart.

Last modified: June 12, 2014

var nsManager = customXmlPart.namespaceManager);

function setXMLPartNamespaceManagerNamespace() {
    Office.context.document.customXmlParts.getByIdAsync("{3BC85265-09D6-4205-B665-8EB239A8B9A1}", function (result) {
        var xmlPart = result.value;
        xmlPart.namespaceManager.addNamespaceAsync("myPrefix", "myNamespace");
    });
}

App types

Task pane apps

Supported clients

Word 2013, Word 2013 SP1, Word 2013 RT

Library

Office.js

Namespace

Office

Show:
© 2014 Microsoft