This topic has not yet been rated - Rate this topic

Document.customXmlParts property (JavaScript API for Office v1.1)

JavaScript API for Office v1.1

Gets an object that represents the custom XML parts in the document.

Last modified: February 26, 2014

var xmlParts = Office.context.document.customXmlParts;

function getCustomXmlParts(){
    Office.context.document.customXmlParts.getByNamespaceAsync('http://tempuri.org', function (asyncResult) {
        write('Retrieved ' + asyncResult.value.length + ' custom XML parts');
    });
}

// Function that writes to a div with id='message' on the page.
function write(message){
    document.getElementById('message').innerText += message; 
}

App types

Task pane apps

Supported clients

Word 2013, Word 2013 SP1

Library

Office.js

Namespace

Office

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.