Define on dropdown menu, languages for invite
This commit is contained in:
@@ -117,7 +117,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Componente usato per la visualizzazione delle notifiche -->
|
||||
<div class="MessageBanner" style="position:absolute;bottom: 0;">
|
||||
<div class="MessageBanner-content">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
||||
* See LICENSE in the project root for license information.
|
||||
*/
|
||||
@@ -9,39 +9,44 @@ Office.onReady(() => {
|
||||
// If needed, Office.js is ready to be called
|
||||
});
|
||||
|
||||
/**
|
||||
* Writes the event source id to the document when ExecuteFunction runs.
|
||||
* @param event {Office.AddinCommands.Event}
|
||||
*/
|
||||
async function writeInviteIta(event) {
|
||||
Office.context.mailbox.item.body.setAsync(
|
||||
"<a href=\"www.google.com\">Google ITA</a>",
|
||||
{
|
||||
coercionType: "html", // Write text as HTML
|
||||
},
|
||||
|
||||
async function writeValue(event) {
|
||||
Word.run(async (context) => {
|
||||
// insert a paragraph at the end of the document.
|
||||
const paragraph = context.document.body.insertParagraph(
|
||||
"ExecuteFunction works. Button ID=" + event.source.id,
|
||||
Word.InsertLocation.end
|
||||
);
|
||||
// Callback method to check that setAsync succeeded
|
||||
function (asyncResult) {
|
||||
if (asyncResult.status ==
|
||||
Office.AsyncResultStatus.Failed) {
|
||||
write(asyncResult.error.message);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
// change the paragraph color to blue.
|
||||
paragraph.font.color = "blue";
|
||||
|
||||
await context.sync();
|
||||
});
|
||||
|
||||
// Calling event.completed is required. event.completed lets the platform know that processing has completed.
|
||||
event.completed();
|
||||
}
|
||||
|
||||
function getGlobal() {
|
||||
return typeof self !== "undefined"
|
||||
? self
|
||||
: typeof window !== "undefined"
|
||||
? window
|
||||
: typeof global !== "undefined"
|
||||
? global
|
||||
: undefined;
|
||||
async function writeInviteEng(event) {
|
||||
Office.context.mailbox.item.body.setAsync(
|
||||
"<a href=\"www.google.com\">Google Eng</a>",
|
||||
{
|
||||
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);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
event.completed();
|
||||
}
|
||||
|
||||
const g = getGlobal();
|
||||
Office.actions.associate("writeInviteIta", writeInviteIta);
|
||||
|
||||
Office.actions.associate("writeValue", writeValue);
|
||||
Office.actions.associate("writeInviteEng", writeInviteEng);
|
||||
Reference in New Issue
Block a user