theofred
theofred

Reputation: 77

Creating Word document from Excel Add-In with Office.js

Is it possible to create a .docx file from an Excel Add-In written in office.js?

My use case would be to open an Excel file (on Windows, so the host is an Excel Application), open the Add-In and the Add-In creates a Word document based on data within the Excel file.

From the things that I've seen, it is not possible to call the Word.run() host function from inside a Excel Add-In. I will always get an error that the namespace Word is unknown.

Is this even an intended feature to make 'cross-host calls'?

Upvotes: 2

Views: 428

Answers (1)

Aziz Ayoubi
Aziz Ayoubi

Reputation: 74

I had almost the same question: How to get the active PowerPoint presentation from Excel in office.js? and got the answer:

An Office add-in can only work with the Office application (Excel, Word, PowerPoint, etc.) in which it is open. It cannot reach outside the Office application to work with a document in another Office application.

Eventually I moved back to VSTO and C#

Upvotes: 1

Related Questions