-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
28 lines (28 loc) · 1.03 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<script>
function setSignature () {
Office.context.mailbox.item.body.setSignatureAsync("Taskpane", { coercionType : 'html' }, (asyncResult)=> {
if (asyncResult.status !== Office.AsyncResultStatus.Succeeded) {
console.error(result.error.message)
} else{
console.log(result.value)
}
})
}
</script>
<title>addin</title>
</head>
<body>
<noscript>
<strong>We're sorry but this addin doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<button type="button" onclick="setSignature()">Insert Signature</button>
<script src="https://appsforoffice.microsoft.com/lib/1/hosted/office.js" type="text/javascript"></script>
</body>
</html>