Unable to set the active printer property of application class
Unable to set the active printer property of application class
(OP)
The following VB5 code works (Word2002):
Dim WordApp As Object
Set WordApp = CreateObject("Word.Application")
WordApp.ActivePrinter = "test"
The following VB5 code gives
Unable to set the active printer property of application class (Excel2002):
Dim ExcelApp As Object
Set ExcelApp = CreateObject("Excel.Application")
ExcelApp.ActivePrinter = "test"
Thank You
Dim WordApp As Object
Set WordApp = CreateObject("Word.Application")
WordApp.ActivePrinter = "test"
The following VB5 code gives
Unable to set the active printer property of application class (Excel2002):
Dim ExcelApp As Object
Set ExcelApp = CreateObject("Excel.Application")
ExcelApp.ActivePrinter = "test"
Thank You
RE: Unable to set the active printer property of application class
You could try the following:
set test as default printer, open excel VBA editor, create a test procedure:
Public Sub test()
strprinter = Application.ActivePrinter
Application.ActivePrinter = strprinter
End Sub
Step through this code, see what name is given to strprinter and see if the line Application.ActivePrinter = strprinter will work. If this works then you know what should be the exact printername you have to put into your code.
hope this helps.
RE: Unable to set the active printer property of application class
This comes from an XL application I use to create a series of postscript files from an Excel report.
Application.ActivePrinter = "Acrobat Distiller on Ne00:"
I have to use the port on which the printer can be found for it to work; the NE00 is one of the ports on a network print server
Check your test printer's properties for the port it uses
Hope this helps
Cheers
Nikki