Skip to content

Instantly share code, notes, and snippets.

@rajeevprasanna
Created January 18, 2018 10:21
Show Gist options
  • Save rajeevprasanna/ca4b8de17ef8b89a226bc6fec40d6683 to your computer and use it in GitHub Desktop.
Save rajeevprasanna/ca4b8de17ef8b89a226bc6fec40d6683 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Test</title>
<!-- Office JavaScript API -->
<script type="text/javascript" src="https://appsforoffice.microsoft.com/lib/1/hosted/office.js"> </script>
<script type="text/javascript" src="https://backflipt.com/js/core-2.4.1.min.js"></script>
</head>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"> </script>
<div>
<div id="tempId" >mail participants auto update</div>
</div>
</html>
<script type="text/javascript">
Office.initialize = function (reason) {
console.error('reason =>' + reason);
setInterval(function(){
Office.context.mailbox.item.to.getAsync(callback);
function callback(asyncResult) {
for (var i=0; i<asyncResult.value.length; i++){
console.error("asyncResult.value => "+ asyncResult.value[i].emailAddress);
document.getElementById("content").innerHTML = asyncResult.value[i].emailAddress;
}
}
}, 1000);
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment