0

I have created a macro in VBA. I want to call that macro on click on button in Task Add-in button.

Is there any way to run macro using button provided in Task Add-in panel?

enter image description here

Philip Rueker
  • 948
  • 5
  • 15
Nanji Mange
  • 2,155
  • 4
  • 29
  • 63
  • Does this answer your question? [Office-JS & VBA Addin How to mix together](https://stackoverflow.com/questions/45156707/office-js-vba-addin-how-to-mix-together) – FreeSoftwareServers Feb 01 '23 at 17:21
  • https://stackoverflow.com/questions/75299140/can-i-call-a-pre-xisting-macro-via-the-office-add-in-javascript-library – FreeSoftwareServers Feb 01 '23 at 17:22
  • Short answer, yes, through customxmlparts events. Essentially on click you can send a formatted xmlpart that excel will listen for. Even better, since word is your host, you can actually listen to node modification events from the addin side. – Michael B Aug 11 '23 at 18:43

1 Answers1

1

Office.hs API doesn't provide this functionality. If this is a new feature you want to include in the future, I suggest you submit a feedback at https://officespdev.uservoice.com/

You may read the thread from MSDN: Run Word Macro - Office App Javascript API

Slava Ivanov
  • 6,666
  • 2
  • 23
  • 34