AllExperts > Experts 
Search      

VB.NET

Volunteer
Answers to thousands of questions
 Home · More Questions · Answer Library  · Encyclopedia ·
More VB.NET Answers
Question Library

Ask a question about VB.NET
Volunteer
Experts of the Month
Expert Login

Awards

About Us
Tell friends
Link to Us
Disclaimer

 
 
 
 
About Chris
Expertise
I can answer pretty much any question relating to VB.NET and its use in a Windows environment. I specialize in ASP.NET web development and MSSQL database access.

Experience
I have over 5 years of industry experience using VB.NET and other .NET technologies for web and database development.

Education/Credentials
I have some college education, but does it really matter in this field of work?

 
   

You are here:  Experts > Computing/Technology > Basic > VB.NET > Printing - .rtf, tiff and docs

Topic: VB.NET



Expert: Chris
Date: 8/29/2007
Subject: Printing - .rtf, tiff and docs

Question
I have a .net WebApplication were saved the following files types in a temp folder (.tiff, .rtf and docs) on the webserver, after saving these files, the user will click Print to print them ALL. How can I use the PrintSpooler to do this?

Answer
Hi,
This is kind of out of my area of expertise, but I did find something through Google that may help.  Unfortunately, you'll have to have the printer you want to use set as the default printer on the machine hosting the web application, and that machine will also need to have the appropriate software installed to read these files (eg: MS Word).

Imports System.Diagnostics

Dim psi As New ProcessStartInfo
psi.UseShellExecute = True
psi.Verb = "print"
psi.WindowStyle = ProcessWindowStyle.Hidden
psi.FileName = "<your file name here>"
Process.Start(psi)

I found this here:
http://www.dnzone.com/forum/topic.asp?topic_id=89

This should print through the regular windows print spooler interface.

Add to this Answer    Ask a Question



  Rate this Answer
   Was this answer helpful?
Not at allDefinitely              
   12345  

     
About Us | Advertise on This Site | User Agreement | Privacy Policy | Help
Copyright  © 2008 About, Inc. About and About.com are registered trademarks of About, Inc. The About logo is a trademark of About, Inc. All rights reserved.