// Global variables
var _Item;
var _MyEntities;
// The initialize function is required for all apps.
Office.initialize = function (reason) {
var _mailbox = Office.context.mailbox;
// Obtains the current item.
Item = _mailbox.item;
// Reads all instances of supported entities from the subject
// and body of the current item.
MyEntities = _Item.getEntities();
// Checks for the DOM to load using the jQuery ready function.
$(document).ready(function () {
// After the DOM is loaded, app-specific code can run.
});
}
// Gets instances of the Address entity on the item.
function myGetAddresses()
{
var htmlText = "";
// Gets an array of postal addresses. Each address is a string.
var addressesArray = _MyEntities.addresses;
for (var i = 0; i < addressesArray.length; i++)
{
htmlText += "Address : <span>" + addressesArray[i] + "</span><br/>";
}
document.getElementById("entities_box").innerHTML = htmlText;
}
上記のコードを使用して電子メール アドレスにアクセスしていますが、entities_box div に結果が表示されません。
cc にアクセスする方法と、そこからメール アドレスにアクセスする方法を教えてください。