Export (0) Print
Expand All

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: June 12, 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, Word 2013 RT

Library

Office.js

Namespace

Office

Show:
© 2014 Microsoft