[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 293
  • Last Modified:

Print in VB2005

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
VBdotnet2005
Asked:
VBdotnet2005
  • 3
1 Solution
 
Bob LearnedCommented:
What version of Acrobat do you have?

Bob
0
 
VBdotnet2005Author Commented:
I believe it is 7.1
0
 
Bob LearnedCommented:
Here is a little code that makes searching faster:

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

Bob
0
 
Bob LearnedCommented:
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now