Solved

Print in VB2005

Posted on 2006-06-19
4
286 Views
Last Modified: 2010-04-23
Is there a shorter or a different way  to print every files in a folder in VB2005?  




Private Sub btnPrintCogentPDF_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPrintCogentPDF.Click
        Dim myProcess As New Process
        Dim myFileinfo As FileInfo
        Dim myDir As DirectoryInfo = New DirectoryInfo("G:\MailBox\Attach\sample")

        'Dim i As Integer
        'i = 1


        For Each myFileinfo In myDir.GetFiles()
            'i += 1
            'If myFileinfo.Extension = ".pdf" Then

                myProcess.StartInfo.FileName = myFileinfo.FullName
                myProcess.StartInfo.Verb = "print"
                myProcess.Start()

               

            'End If
        Next



    End Sub
0
Comment
Question by:VBdotnet2005
[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
4 Comments
 
LVL 96

Expert Comment

by:Bob Learned
ID: 16945786
What version of Acrobat do you have?

Bob
0
 

Author Comment

by:VBdotnet2005
ID: 16989897
I believe it is 7.1
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 17000225
Here is a little code that makes searching faster:

For Each myFileinfo In myDir.GetFiles("*.pdf")

Bob
0
 
LVL 96

Accepted Solution

by:
Bob Learned earned 250 total points
ID: 17000228
I believe that it is possible with the ActiveX control to print, but I lost my train of thought, since you took so long to respond.

Bob
0

Featured Post

Technology Partners: 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

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

615 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