97 lines
4.0 KiB
HTML
97 lines
4.0 KiB
HTML
<!-- Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License. -->
|
|
<!--<!DOCTYPE html>
|
|
<html>
|
|
|
|
<head>-->
|
|
<!-- Office JavaScript API -->
|
|
<!--<script type="text/javascript" src="https://appsforoffice.microsoft.com/lib/1/hosted/office.js"></script>
|
|
</head>
|
|
|
|
<body>
|
|
<p>This add-in will insert the text 'Hello world!' in a new message.</p>
|
|
<button id="helloButton">Say hello</button>-->
|
|
<!-- The following image URL tracks diagnostic data for this sample add-in. Please remove the image tag if you reuse this sample in your own code project. -->
|
|
<!--<img src="https://pnptelemetry.azurewebsites.net/pnp-officeaddins/samples/outlook-add-in-hello-world-run" />
|
|
</body>
|
|
|
|
<script>
|
|
|
|
Office.onReady((info) => {
|
|
if (info.host === Office.HostType.Outlook) {
|
|
document.getElementById("helloButton").onclick = sayHello;
|
|
}
|
|
});
|
|
|
|
/**
|
|
* Writes 'Hello world!' to a new message body.
|
|
*/
|
|
function sayHello() {
|
|
Office.context.mailbox.item.body.setAsync(
|
|
"Hello world!",
|
|
{
|
|
coercionType: "html", // Write text as HTML
|
|
},
|
|
|
|
// Callback method to check that setAsync succeeded
|
|
function (asyncResult) {
|
|
if (asyncResult.status ==
|
|
Office.AsyncResultStatus.Failed) {
|
|
write(asyncResult.error.message);
|
|
}
|
|
}
|
|
);
|
|
}
|
|
|
|
</script>
|
|
|
|
</html>-->
|
|
<!-- Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License. -->
|
|
<!-- This file shows how to design a first-run page that provides a welcome screen to the user about the features of the add-in. -->
|
|
|
|
<!DOCTYPE html>
|
|
<html>
|
|
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>Contoso Task Pane Add-in</title>
|
|
|
|
<!-- Office JavaScript API -->
|
|
<script type="text/javascript" src="https://appsforoffice.microsoft.com/lib/1.1/hosted/office.js"></script>
|
|
|
|
<!-- For more information on Fluent UI, visit https://developer.microsoft.com/fluentui#/. -->
|
|
<link rel="stylesheet" href="https://static2.sharepointonline.com/files/fabric/office-ui-fabric-js/1.4.0/css/fabric.min.css" />
|
|
<link rel="stylesheet" href="https://static2.sharepointonline.com/files/fabric/office-ui-fabric-js/1.4.0/css/fabric.components.min.css" />
|
|
<script src="https://static2.sharepointonline.com/files/fabric/office-ui-fabric-js/1.4.0/js/fabric.min.js"></script>
|
|
|
|
<!-- Template styles -->
|
|
<link href="taskpane.css" rel="stylesheet" type="text/css" />
|
|
|
|
<script type="text/javascript" src="taskpane.js"></script>
|
|
</head>
|
|
|
|
<body class="ms-font-m ms-welcome ms-Fabric">
|
|
<!-- The following image URL tracks diagnostic data for this sample add-in. Please remove the image tag if you reuse this sample in your own code project. -->
|
|
<img src="https://pnptelemetry.azurewebsites.net/pnp-officeaddins/samples/word-add-in-commands-run" />
|
|
|
|
<header class="ms-welcome__header ms-bgColor-neutralLighter">
|
|
<img width="90" height="90" src="../../assets/logo-filled.png" alt="Contoso" title="Contoso" />
|
|
<h1 class="ms-font-su">Welcome</h1>
|
|
</header>
|
|
<section id="sideload-msg" class="ms-welcome__main">
|
|
<h2 class="ms-font-xl">Please sideload your add-in to see app body.</h2>
|
|
</section>
|
|
<main id="app-body" class="ms-welcome__main" style="display: none;">
|
|
<p class="ms-font-l">Choose <b>Hello</b> to create a new paragraph saying "Hello World".</p>
|
|
<button id="run" class="ms-Button">
|
|
<span class="ms-Button-label">Hello</span>
|
|
</button>
|
|
<p></p>
|
|
<div>
|
|
<span class="ms-font-m">To learn more, see <a href="https://learn.microsoft.com/office/dev/add-ins/develop/create-addin-commands" target="_blank">Create add-in commands in your manifest for Excel, PowerPoint, and Word</a></span>
|
|
</div>
|
|
</main>
|
|
</body>
|
|
|
|
</html> |