Solved

Print in VB2005

Posted on 2006-06-19
4
279 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
  • 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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

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…
Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

747 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

13 Experts available now in Live!

Get 1:1 Help Now