In our VB6 application, when the user's default printer is set to Microsoft Office Document Image Writer the following line of code causes the application to throw error number 380 (Invalid property value).
Printer.Orientation = vbPRORLandscape
If you are unfamiliar with what this line is doing, it is responsible for ensuring that the user's default printer is set up to print whatever is provided to it in landscape mode, and also provides landscape orientation dimensions (height/width) (on the Printer object) so following code can properly base item placement coordinates on the page.
I've Goggled around and it seems to be a generally accepted (and complained about) "missing feature" from the MODIW driver, for example see this thread. There were some workarounds like presenting the user with the Windows Printer Settings window (after presumably instructing them to select landscape in the options) or checking if the printer is the MODIW, and then preventing the user from generating the document that needs to be in landscape mode. There was another suggesting involving something called DEVMODE, but I didn't understand this suggestion, nor did I find a decent example, nor did I find anyone confirming that it worked.
I'm kinda at my wits end. Physical printers have no issue with this line; even the Microsoft XPS Document Writer and the various PDF printers I have tried have no issues with this line. I'm throwing this out here, hoping some awesome VB6 dev has found some previously undocumented way of making the orientation change with the Microsoft Office Document Image Writer driver.