![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I'm trying to print a job to a specific network printer. I'm using an ActiveX Script Task to execute to execute the print job. However, when I compile the code, I get an error on the Dim statement "as printer". However, when I go to my VB reference book, it notes that "as printer" is a valid argument for VB Built-In Collections (e.g. Printers or Forms). Does anyone have experience with this? Can someone help me with this? Is there any other VB source in a DTS package? Dim XLPrinter as Printer 'PROCESS (PRINT) WORKSHEET: For Each XLPrinter In Printers If XLPrinter.DeviceName = "AcctPrint" Then ' Set printer as system default. Set Printer = XLPrinter XLApp.Echo "Printer Name is " + XLPrinter ' Stop looking for a printer. Exit For End If Next xlapp.workbooks.open XLWkb xlapp.activeworkbook.worksheets(XLWkSht).printout I'm trying to print a job to a specific network printer. I'm using an ActiveX Script Task to execute the following code: |
![]() |
| Thread Tools | |
| Display Modes | |
| |