Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

258
Visualizações
Property 'actions' does not exist on type 'typeof Office' When using Word task pane add-in

I was tasked to adding an additional feature to our Word Addin.

We are trying to add custom shortcuts.

I have used the code that was given on https://docs.microsoft.com/en-us/office/dev/add-ins/design/keyboard-shortcuts#configure-the-manifest and when using the code I get the error: Property 'actions' does not exist on type 'typeof Office'

Here is what the code looks like:

Office.actions.associate('SHOWTASKPANE', function () {
    return Office.addin.showAsTaskpane()
        .then(function () {
            return;
        })
        .catch(function (error) {
            return error.code;
        });
});

I have gone through the Office.js file and I cant see if anything is missing.

Your help would really be appreciated

about 4 years ago · Juan Pablo Isaza
2 Respostas
Responde à pergunta

0

May add these functions to the global scope and don`t use action will help for you.

function getGlobal() {
  return typeof self !== "undefined"
? self
: typeof window !== "undefined"
? window
: typeof global !== "undefined"
? global
: undefined;
}

let g = getGlobal()

g.SHOWTASKPANE= function () {
    return Office.addin.showAsTaskpane()
        .then(function () {
            return;
        })
        .catch(function (error) {
            return error.code;
        });
});;
about 4 years ago · Juan Pablo Isaza Relatório

0

Try this:

npm install @types/office-js --save-dev
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda