Solved

VBscript or SSIS - send document to specific printer

Posted on 2011-03-07
3
232 Views
Last Modified: 2014-01-01
Problem:  I need to send an excel report directly to a specific printer when the report completes.

Using either SSIS or VBscript, what is the best way to do this?

a) the report runs in SSIS in SQL Server 2008
b) the report is exported to Excel

Thank you.
0
Comment
Question by:Brugge2
3 Comments
 
LVL 65

Accepted Solution

by:
RobSampson earned 500 total points
ID: 35062287
Hi, it sounds like the report has a macro to "complete" it, so add this on the end:

strOriginalPrinter = Application.ActivePrinter
strNewPrinter = "the new printer name"
Application.ActivePrinter = "strNewPrinter"
ActiveSheet.PrintOut
Application.ActivePrinter = strOriginalPrinter

Regards,

Rob.
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This script will sweep a range of IP addresses (class c only, 255.255.255.0) and report to a log the version of office installed. What it does: 1.)      Creates log file in the directory the script is run from (if it doesn't already exist) 2.)      Sweep…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question