Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

272
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar

0

Try this:

npm install @types/office-js --save-dev
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda