Re: VB Printer Collection in DTS ActiveX VB Script
- From: "Ilya Margolin" <ilya_no_spam_@xxxxxxxxxx>
- Date: Wed, 27 Jul 2005 09:41:52 -0400
Leslie,
ActiveX task takes VBScript, not VB. Take a look at:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/vsstmexecute.asp
Ilya
"Leslie" <Leslie@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:6F3C0DC6-A892-46DB-83A0-0FB391B53F5D@xxxxxxxxxxxxxxxx
> 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) WORK***:
> 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:
>
>
>
.
- References:
- VB Printer Collection in DTS ActiveX VB Script
- From: Leslie
- VB Printer Collection in DTS ActiveX VB Script
- Prev by Date: General problem with global variables
- Next by Date: Re: Alternate to SQL Replication
- Previous by thread: VB Printer Collection in DTS ActiveX VB Script
- Next by thread: shrink dts step log
- Index(es):