Solved

VBscript or SSIS - send document to specific printer

Posted on 2011-03-07
3
229 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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

705 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now