Solved

Print in VB2005

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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
vb.net 1 month apart 11 38
UDP Data Capture Thread Issue 7 29
VB.net Is there code behind PowerPivot 2 43
Copying from a network share 3 19
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…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

679 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