Accessing Word API from an Excel add-in or vice-versa

160 Views Asked by At

In VBA, It's posssible to reference an open instance of word (using GetObject(Class:="Word.Application") in order to manipulate documents (.Documents) using the word object reference, even when the macro itself is running in excel.

Is it possible to do anything similar in office.js? I've noticed that by simply adding a Document host to the manifest file, an addin can be freely reconfigured to run in word or excel, with only one library (Word or Excel) loaded at a time. Executing Word.Run from within an excel taskpane or vice-versa will fail as the Word object itself is missing.

1

There are 1 best solutions below

0
On

In VBA you can automate Office applications. In Office web add-ins not.