View Full Version : Using PrintOut with non-default printer

04-03-2017, 03:01 PM
I have an intranet web page at work which contains a button that opens up the HTML file in a Word instance, adds a "For Official Use Only" footer, then prints itself all using the ActiveXObject. I was able to do this because our company only allows IE for our browser. On everyone's computer, there is a regular printer set up as the default as well as a FoxIt PhantomPDF writer printer. Is it possible to change where a file is sent for printing so that it doesn't go to the default printer?

Here is what I've tried:
I've looked up the PrintOut method on Microsoft's website and see that there are a few parameters that I can set, but, unlike in VBA, I can't set specific attributes using the "attribute:value" notation.
Next, I tried calling the PrintOut method using null values for those items that I don't need to use. When I do this, I get an error that says "The number must be between -32765 and 32767", but I don't know which number it is talking about.

I'm hoping someone can help me with this or let me know if it can even be done.