0
votes

Question: Is there a way to leverage the Office JavaScript API to allow me to automate the printing of Word documents?

Background: I have a Word Add-In solution that allows users to generate and customize letters merging fields from a database into those letters. While I have used VSTO in the past, this is my first attempt to leverage Add-Ins to automate Office (Word in this case). Almost complete but now I just need to be able to include a "Print All" button at the bottom of the task pane which will leverage the template (Word document), iterating through each record imported from the database to populate that template with data and print it. I have searched but can find zero (0) references or examples on how to do this and my review of the JavaScript API shows no properties or methods (in either the Word API or the Common API)to accomplish printing the document. Is this possible? Seems like such a basic need.

Thanks in advance for any assistance.

2

2 Answers

0
votes

There isn't a Word API to automate Print. You may check if you want to use getFileAsync to convert them to PDF instead.

0
votes

I could not find a way to do it in word but you can do it with google docs which could provide you with the same results. you can automate using google appscripts which is just javascript with their api. you can then use ezeep print api to print out your documents anywhere.