This topic has not yet been rated - Rate this topic

Document.customXmlParts property (apps for Office)

apps for Office

Published: February 26, 2013

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

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; 
}

Supported clients

Word 2013

Library

Office.js

Namespace

Office

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.