Hello all,
I've written an windows application that loops through a number of folders / sub folders and creates a list of files. these files will be printed..
file types are docx, xlsx, ppt, pptx etc..
The problem I have, is some of the files are password protected. and when I try to print in mass, they pop up with the password box ..
Is there a way to populate the password box with a password in VB?
Thanks in advance.Code:Dim printer As String = "" Dim printDialog As New PrintDialog() If printDialog.ShowDialog(Me) = Windows.Forms.DialogResult.OK Then printer = printDialog.PrinterSettings.PrinterName End If For F As Integer = 0 To PrintArrayList.Length - 1 Dim FN As String = PrintArrayList(1, F) startInfo = New ProcessStartInfo(FN) With startInfo .WindowStyle = ProcessWindowStyle.Normal .Verb = "PrintTo" .Arguments = """" & printer & """" .CreateNoWindow = False .UseShellExecute = True End With Try System.Diagnostics.Process.Start(startInfo) Catch ex As Exception MsgBox(ex.ToString) End Try Next
Dave




Reply With Quote
