Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

260
Views
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 answers
Answer question

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 Report

0

Try this:

npm install @types/office-js --save-dev
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!