Skip to main content

Problem:

In a .NET Cobol program which creates and prints a Word document, how do I set the ActivePrinter property from within the Cobol program to select the printer I require?

Resolution:

You can use the OLE Object, e.g. a Word document, to set the printer settings.

Have a look at the attached demo for how to get the name of the default printer using the ActivePrinter property.  The commented out lines in the code will change the printer name.

Attachments:

test1_1403.zip

Old KB# 4056