ActiveXObject Word (JavaScript) Printing a Word document with an specific printer

229 Views Asked by At

actual I want to use an ActiveXObject to print an Word document. But the Problem is the Method from word. I use the method "PrintOut" and want not to set all values of the method (for example the value for the "OutputFileName"). Moreover I want to set an printer with the method.

Here the function I want to use: https://learn.microsoft.com/de-de/office/vba/api/word.document.printout

Here my code example:

var objWord;
objWord = new ActiveXObject("Word Application");
objWord.Visible = true;
objWord.Documents.Open(".........");
objWord.ActiveDocument.PrintOut(true,false,0,)

Thank you a lot for your answers.

0

There are 0 best solutions below