Solved

VBscript or SSIS - send document to specific printer

Posted on 2011-03-07
3
238 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article is the result of a quest to better understand Task Scheduler 2.0 and all the newer objects available in vbscript in this version over  the limited options we had scripting in Task Scheduler 1.0.  As I started my journey of knowledge I f…
SQL Server engine let you use a Windows account or a SQL Server account to connect to a SQL Server instance. This can be configured immediatly during the SQL Server installation or after in the Server Authentication section in the Server properties …
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

623 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