Variable refactor, fix function and add glag icon img

This commit is contained in:
Claudio Boggian
2024-06-25 14:26:45 +02:00
parent e46c52033d
commit 5169257d20
15 changed files with 73 additions and 67 deletions
+17 -16
View File
@@ -5,34 +5,35 @@
/* global global, Office, self, window, Word */
Office.onReady(() => {
Office.onReady((data) => {
// If needed, Office.js is ready to be called
});
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 writeInviteIta(event) {
Office.context.mailbox.item.body.prependAsync(
"<a href=\"https://portal.pal.it/General/VisitorRegistration\">Registrati come visitatore per agevolare il tuo ingresso in PAL s.r.l.</a><br/><br/>",
{
coercionType: "html",
},
// Callback method to check that setAsync succeeded
function (asyncResult) {
if (asyncResult.status ==
Office.AsyncResultStatus.Failed) {
write(asyncResult.error.message);
}
// Callback method to check that setAsync succeeded
function (asyncResult) {
if (asyncResult.status ==
Office.AsyncResultStatus.Failed) {
write(asyncResult.error.message);
}
}
);
event.completed();
}
async function writeInviteEng(event) {
Office.context.mailbox.item.body.setAsync(
"<a href=\"www.google.com\">Google Eng</a>",
Office.context.mailbox.item.body.prependAsync(
"<a href=\"https://portal.pal.it/General/VisitorRegistration\">Register as a visitor to facilitate your entry into PAL s.r.l.</a><br/><br/>",
{
coercionType: "html", // Write text as HTML
coercionType: "html",
},
// Callback method to check that setAsync succeeded